How to check if your on the Home page using Joomla! 1.5 using PHP

Written by Ian Carnaghan · 7 sec read >

Anywhere in your code place the following code

	if(JRequest::getVar('view') == "frontpage" ) :
	 echo "I'm on the Front Page";
	else :
	 echo "Not on the Front Page";

The above code may be modified according to your needs

Last Updated On March 30, 2018
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. Profile

Leave a Reply

Notify of