Free Joomla Templates

joomla templates arrow Template Tutorials arrow hide the module in Templates

hide the module in Templates

So you're building a template, and you're trying to figure out how to hide the module display when the module is not showing. Let me put it another way, you've built a fancy template that has some html associated with your module blocks, but when you unpublish your module, you don't want an empty html table with graphics hanging around {mosgoogle}

By using the mosCountModules function, you can hide these types of module blocks when your modules are unpublished (and of course show them when the repective modules are published).

  <?php if (mosCountModules( 'right' )) { ?>
 
    <td>
 
      <?php mosLoadModules( 'right' ); ?>
 
    </td>
 
  <?php } ?>
  
   
  
let us know if it worked for you. Good luck and jappy joomla-ing!

 
< Prev   Next >
 
Joomla Templates by Joomlashack