If you're using Joomla! 1.0 then you'll only need to verify the current component with the following command:
PHP:
-
if ($option == 'com_frontpage' || $option == '') {
-
echo 'This is the front page';
-
}
This task for Joomla! 1.5 could be easily confirmed by the following command:
PHP:
-
if ( JRequest::getVar('view') === 'frontpage' ) {
-
echo 'This is the front page';
-
}
Just in case the above command doesn't work then the issue could be a little more complicated and need to check if the current active menu item is the default one. I saw this issue in some 1.5 early versions.
PHP:
-
$menu =& JSite::getMenu();
-
if ($menu->getActive() == $menu->getDefault()) {
-
echo 'This is the front page';
-
}












