Mar
06
Code for decide current page is frontpage
Posted by | Posted in Joomla | Posted on 06-03-2010
Many Joomla users want to show something only on homepage/frontpage of site.
Below is the code to differentiate current page is frontpage or not.
<?php $menu = &JSite::getMenu();
if ($menu->getActive() == $menu->getDefault()) {
echo ‘This is the front page’;
}
?>

