cond1: <?php if($this->countModules('condition')) { ?> do something <?php } else { ?> do something else <?php } ?> explanation: Controls what actions the template's index.php file takes depending on the current state of a module or a set of modules cond2: <?php if(JRequest::getVar('view') == ('current_view') { ?> do something <?php } else { ?> do something else <?php } ?> explanation: Control what actions the template's index.php file takes depending on the current view, e.g., article, category, section, contact, etc. Although this can be used to determine if the current view is the front page ('frontpage'), the Joomla! core developers recommend use of J Site::getMenu(), $menu->getActive, and $menu->getDefault to determine if the current view is the front page. cond3: <?php $menu = &JSite::getMenu(); ?> <?php if ($menu->getActive() == $menu->getDefault()) { ?> do something <?php } else { ?> do something else <?php } ?> explanation: Control what actions the template's index.php file takes if it is the front page versus other pages. cond4: <?php $userattr = JFactory::getUser(); $condition = $userattr->get('attribute') if($condition == 'return value') { ?> do something <?php } ?> explanation: 'attribute' is one of the following; 'id' – user id 'name' – user name 'aid' – defines the user access identifier and acts in the same way as the gid in Joomla! 1.0.x (normally this is 0 for for public, 1 for registered and for for special). The aid is used against the systems access database fields to define if the user can access a certain database res 'gid' – defines the actual acl user group identifier (19, author, 20 editor, 22 publisher, 23 manager, 24 administrator, 25 super administrator 'guest' – defines if a user is logged in or not (when logged in guest is 0) 'usertype' – user type (Registered, Author, Editor, Publisher, Super Administrator, Adminiistrator, Manager)