templates if else - Joomla! Forum - community, help and support


can me else , if useage in template, don't quite it. want make main content div has particular name if particular module present can resize it. had go it's wrong, might able see i'm trying do:

code: select all

<?php
      if (moscountmodules( "user3" )) {
         ?>
         <div id="drivinglessonsboxes">
               <?php mosloadmodules ( 'user3',-2); ?>
            </div><br style="clear:left" />
            <div id="drivinglessonsmain1"><?php mosmainbody(); ?></div>
         <?php
      } else {
         ?>
         <div id="drivinglessonsmain"><?php mosmainbody(); ?></div>
         <?php
      }         
          ?>

the above code makes appear twice. need add in section this? think 'if' line wrong i'm sort of fumbling in dark. it's first time tried using if statement in template. :)

actually statment looks right me.  can see problem @ site?  1 thing though moscountmodules going fire module thats published position. code should not make appear twice.

rob





Comments