I have long since starting with Joomla had a bit of a "thing" against the standard Jooma look for the home page of a site, and figured out that I could do a quick conditional on my template index.php that would show a different layout for the frontpage only:<?php$menu = & JSite::getMenu();if ($menu->getActive() == $menu->getDefault()) {?> HOME PAGE MODULE/CONTENT POSITIONS <? } else {?> REGULAR MODULE/CONTENT POSITIONS<? } ?>
I was playing today with a new project I am working on, and realized that I now have found a reason to do the same thing with a component every now and again.The code is just a bit different, so I thought I'd post it here, since there may be some times when you want to hide module positions based on whether you are in K2 (or any other component - I'm using it for JomSocial on a K2 site) or not.<?phpif ($_GET["option"]=="com_COMNAME") {?> SPECIAL CASE MODULE/CONTENT POSITIONS <? } else {?> REGULAR MODULE/CONTENT POSITIONS<? } ?>
*smiles*