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

10 sec read

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;

Last Updated On March 30, 2018

Leave a Reply

avatar
  Subscribe  
Notify of