does anyone have a quick snippet of code to place in a template, that would enable me to detect if current item or URL is the homepage? Basically, I'm trying to load something on the homepage only, like in WordPress how you'd use if(is_home()) thanks
<? $string = $PHP_SELF; if ($string == "/index.php") {include('whatever.inc');}?> Code (markup): Anyway, there's probably a better way. I don't know if joomla has it's own functions for the home page like wordpress.
Here, I figured out the code to do it: $pge = $_SERVER['QUERY_STRING']; if ($pge == "/index.php"||$pge == "") {//do stuff} PHP: