Posted By

morktron on 08/06/12


Tagged

php joomla 25


Versions (?)

Conditionial statement to show html in Joomla 2.5


 / Published in: PHP
 

Show html on homepage and different html on other pages

  1. <?php
  2. $app = JFactory::getApplication();
  3. $menu = $app->getMenu();
  4. ?>
  5. <? if ($menu->getActive() == $menu->getDefault()) { ?>
  6. this is the front page
  7. <?php } else { ?>
  8. do something else
  9. <?php } ?>

Report this snippet  

You need to login to post a comment.