I used this article:
http://docs.joomla.org/Using_the_Page_C ... plate_Code
and if i use
Code: Select all
<body id="<?php echo $pageclass ? htmlspecialchars($pageclass) : 'default'; ?>">
Any ideas?
Moderator: General Support Moderators
Post by Mihc » Fri Apr 13, 2012 7:06 am
Code: Select all
<body id="<?php echo $pageclass ? htmlspecialchars($pageclass) : 'default'; ?>">
Post by tinocordes » Thu Jun 07, 2012 10:59 am
Thanks! This works for me :-) At first I forgot that I hadn't assigned a class to the specific menu link in the admin.adelion wrote:Here is a solution for 2.5.x users:Code: Select all
<?php $itemid = JRequest::getVar('Itemid'); $menu = &JSite::getMenu(); $active = $menu->getItem($itemid); $params = $menu->getParams( $active->id ); $pageclass = $params->get( 'pageclass_sfx' ); ?> <html> <head> <jdoc:include type="head" /> </head> <body class="<?php echo $pageclass ?>">
Post by Helvecio » Sun Jan 13, 2013 3:37 pm
Code: Select all
<?php
$menus = &JSite::getMenu();
$menu = $menus->getActive();
$pageclass = "";
if (is_object( $menu )) :
$params = new JParameter( $menu->params );
$pageclass = $params->get( 'pageclass_sfx' );
endif; ?>
Code: Select all
<body class="<?php echo $pageclass; ?>">
tinocordes wrote:Thanks! This works for me :-) At first I forgot that I hadn't assigned a class to the specific menu link in the admin.adelion wrote:Here is a solution for 2.5.x users:Code: Select all
<?php $itemid = JRequest::getVar('Itemid'); $menu = &JSite::getMenu(); $active = $menu->getItem($itemid); $params = $menu->getParams( $active->id ); $pageclass = $params->get( 'pageclass_sfx' ); ?> <html> <head> <jdoc:include type="head" /> </head> <body class="<?php echo $pageclass ?>">
Post by creativesights » Tue Jan 22, 2013 4:09 am
Return to “Templates for Joomla! 1.5”
© 2005 - 2024 Open Source Matters, Inc. All Rights Reserved.