How to check if your on the Home Page that does not use the Front Page layout in Joomla! 1.5 using PHP

Use the code below on any page in your Joomla! application, the code may be changed or modified according to your needs.

 
	$menu = &JSite::getMenu();
 
	if (JRequest::getInt('Itemid') == $menu->getDefault()):
 
	    echo "I'm on the Home Page";
 
	else:
 
	    echo "I'm not on the Home Page";
 
	endif;

Image Credits: Photo by Isis França on Unsplash.

More Similar Posts

No results found.

Menu