Detecting home page & languages Skriv ut

  • 2

In case you need to have condition or take your visitors to defernt languages the solution is:

<?php
$menu   = JSite::getMenu();
$lang = JFactory::getLanguage();
if ($menu->getActive() == $menu->getDefault($lang->getTag())): ?>
            <p> HOME PAGE</p>
<?php endif; ?>

Hjälpte svaret dig?

«Tillbaka

Powered by WHMCompleteSolution