Skip to Content Skip to Navigation
bobbravo2: @hostgator Sponsored WordCamp Houston (@wordcamphtx) August 7th, I want to be there! #wchtx
bobbravo2: Starcraft 2 is awesome so far

Adding a body class suffix to a template

Adding a class suffix to the <body> tag of a Joomla! Template

 
<?php
$menus     = &JSite::getMenu();
$menu       = $menus->getActive();
$pageclass = "";
 
if (is_object( $menu )) : 
$params = new JParameter( $menu->params );
$pageclass = $params->get( 'pageclass_sfx' );
endif; 
?>
</head>
<body class="<?php echo $pageclass; ?>">
 

blog comments powered by Disqus