To detect if current page is Joomla hage page, do this code:
<?php
$uri = $_SERVER['REQUEST_URI'];
if ($uri == “/”) {
echo “You’re on the homepage”;
}
?>
$uri = $_SERVER['REQUEST_URI'];
if ($uri == “/”) {
echo “You’re on the homepage”;
}
?>










#1 by hmmm on August 24th, 2009
Except that /index.php is also the homepage, if no parameters are passed..
#2 by Tomy Tran on January 4th, 2010
other way, it will be wrong with case of joomla installed on subfolder:
domain = http://www.mydomain.com
installed on: http://www.mydomain.com/joomla
uri will be /joomla/