Created
July 3, 2013 12:18
-
-
Save betweenbrain/5917439 to your computer and use it in GitHub Desktop.
Joomla! home (default menu item) page only module position with multi-lingual support.
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 | |
| $app = JFactory::getApplication(); | |
| $menu = $app->getMenu(); | |
| $lang = JFactory::getLanguage(); | |
| $isHome = $menu->getActive() == $menu->getDefault($lang->getTag()); | |
| ?> | |
| <?php if ($isHome) : ?> | |
| <jdoc:include type="modules" name="home"/> | |
| <?php endif ?> | |
| PROTIP: You can extend the logic of $isHome to be language specific, such as $isHomeEn = $menu->getActive() == $menu->getDefault('en-GB'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment