Question : Joomla Body ID Tag Using Menu Item Alias

Hi,

I am trying to create unique body tags for each of my pages in my custom template that I created for Joomla.  In my custom template index.php file, I used the code:
 
1:
2:
3:
4:
5:
<?php
$menu = &JSite::getMenu();
$active = $menu->getActive();
?>
<body id="page_<?php print $active->alias; ?>">


in place of the <body> tag.  

In my Joomla admin panel, I go to Menus -> Menu Manager, and click "Menu Items" in the Main Menu row.  I have two items in there: Home (was in there already)  and Courses.  When I click on "Courses," it goes to the editing screen, and the Alias says "courses."  (and it refers to an article "Courses" in the parameters area.

So theoretically, my body tag should say <body id="page_courses">, but it doesn't.  However, the home page DOES work and says: <body id="page_home">, so I know I'm doing something right.  I just must have a setting wrong for the "courses" menu item/article.

Any suggestions?  Is that enough info to go on?

I'm a Joomla newbie, btw.

Thanks!

Answer : Joomla Body ID Tag Using Menu Item Alias

I figured out the problem.  I called the hosting company, and they said the code I was using wouldn't work because the name servers weren't pointed there yet, and I was using a pre propogation IP address.  They gave me a static IP address, and that fixed the problem!

Thank you!
Random Solutions  
 
programming4us programming4us