how to get different id in body tag?
I have placed the following code in joomla 2.5
<?php
$app = JFactory::getApplication();
$menu = $app->getMenu()->getActive();
$pageclass = '';
if (is_object($menu))
$pageclass = $menu->params->get('pageclass_sfx');
?>
<body id="<?php echo $pageclass ? htmlspecialchars($pageclass) :
'default'; ?>">
But it's getting default for all pages.
No comments:
Post a Comment