I've added a page class suffix to one of my menu items within Party Freak (the suffix is "banner-ads" and is added with a leading white space) but it doesn't seem to be adding itself to the "page" only to the "h2" tag.
Any ideas?
<?php
$pageclass_sfx = '';
if( !isset( $_GET['Itemd'] ) ) {
$query = 'SELECT m.params AS params FROM jos_menu AS m WHERE m.id = ' . $_GET['Itemid'];
$row = mysql_fetch_assoc( mysql_query( $query ) );
$pageParams = explode( "n", $row['params'] );
foreach( $pageParams as $value ) {
if( substr( $value, 0, 14 ) == 'pageclass_sfx=' )
$pageclass_sfx = 'class="' . trim( substr( $value, 14, strlen( $value ) ) ) . '"';
} // eof foreach()
} // eof if()
?>
<body <?php echo $pageclass_sfx; ?>>
<?php
$itemid = JRequest::getVar('Itemid');
$menu = &JSite::getMenu();
$active = $menu->getItem($itemid);
$params = $menu->getParams( $active->id );
$pageclass = $params->get( 'pageclass_sfx' );
?>
<body id="<?php echo $pageclass ? htmlspecialchars($pageclass) : 'default'; ?>">
<body id="bd" class="fs<?php echo $this->getParam(GK_TOOL_FONT);?> <?php echo $this->browser();?> <?php echo $pageclass ? htmlspecialchars($pageclass) : 'default'; ?>">