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}'>";
If you like the site, please let me know in the form of cold hard cash!
0 Comments