Created
January 25, 2012 19:53
-
-
Save proweb/1678218 to your computer and use it in GitHub Desktop.
Joomla - Execute some code on home page and other code on all other pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//This will detect the Home Page of Joomla and perfom whatever code you tell it to | |
$menu = & JSite::getMenu(); | |
if ($menu->getActive() == $menu->getDefault()) { | |
//This code will be executed on the home page | |
} else { | |
//This code will be executed on every page except the home page | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment