Written by Phil Snell Tuesday, 08 December 2009 15:19
Here's something I use in templates so that it's easy to apply special styles or effects to certain pages based on the Joomla! environment variables...
$Itemid = JRequest::getInt( 'Itemid', 0 );
$option = JRequest::getCmd( 'option', 'none' );
$view = JRequest::getCmd( 'view', 'none' );
$id = JRequest::getInt( 'id', 0 );
echo "<body id='Itemid_{$Itemid}' class='option_{$option} view_{$view} id_{$id}'>";
0 Comments