Skip to content

Instantly share code, notes, and snippets.

@betweenbrain
Created July 3, 2013 12:18
Show Gist options
  • Select an option

  • Save betweenbrain/5917439 to your computer and use it in GitHub Desktop.

Select an option

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.
<?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