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:
$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.