Access Keys:
Skip to content (Access Key - 0)
Home (Access Key - 1)
All spaces... (Access Key - 3)
Log in (Access Key - 5)
Sign up (Access Key - 6)
Development

Mambo Manual is part of the documentation project for the Mambo open source content management system

Toggle Sidebar

Hiding Modules


Sometimes it is desirable to hide certain module areas if there are no modules assigned to that region. You can hide these areas by using the mosCountModules function.

<?php if (mosCountModules( 'right' )) { ?>
  <tr>
    <?php mosLoadModules( 'right' ); ?>
  </tr>
<?php } ?>

or:

<?php if (mosCountModules( 'right' )) { ?>
  <div>
    <?php mosLoadModules( 'right' ); ?>
  </div>
<?php } ?>

If the mosCountModules function returns a value greater than 1, the table cell will be displayed. If there are no modules defined for the "right" position for this particular page, then the cell will not be displayed. This is a good technique for increasing the horizontal screen width on certain pages.

Note

Table cells will not be displayed in Mambo 4.7 (once this is released).
In 4.7 the only tables are those that are correctly displaying tabular data.

Toggle Sidebar
Space Navigation
Added by Lynne Pope on 29 Dec, 2007 06:49, last edited by Lynne Pope on 07 Feb, 2008 12:27

Adaptavist Theme Builder Powered by Atlassian Confluence
Free theme builder license