Skip to content

Instantly share code, notes, and snippets.

@proweb proweb/index.php
Created Jan 25, 2012

Embed
What would you like to do?
Joomla - Execute some code on home page and other code on all other pages
<?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
You can’t perform that action at this time.