well in order to hide any module position in mambo you need tow things.
ask mambo if the position is enabled (published on that page)
the code to do this is
PHP Code:
<?php if (mosCountModules( "position" )) { } ?>
ok for the rundown.. pretty straight forward, you ask and mambo responds..
whatever you need to hide or show goes between the
{ } brackets.
for some practical use.. say you want to hide the right column on a 3 column layout.. your index.php file (partially) would look something like this:
Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<?php mosLoadModules ( 'left' ); ?>
<?php mosLoadModules ( 'user1' ); ?>
</td>
<td>
<?php include_once ("mainbody.php"); ?>
</td>
<td>
<?php mosLoadModules ( 'right' ); ?>
<?php mosLoadModules ( 'user2' ); ?>
</td>
</tr>
</table> now all you need is to add the first thing i mentioned..
to hide thie right column your code will look sort of like this..
PHP Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<?php mosLoadModules ( 'left' ); ?>
<?php mosLoadModules ( 'user1' ); ?>
</td>
<td>
<?php include_once ("mainbody.php"); ?>
</td>
<?php if (mosCountModules( "right" )) { ?>
<td>
<?php mosLoadModules ( 'right' ); ?>
<?php mosLoadModules ( 'user2' ); ?>
</td>
<?php } ?>
</tr>
</table>
and the above does this.. when the right modules are disabled on a particular section (say simpleboard) this section will be skipped, so you won't see it
PHP Code:
<?php if (mosCountModules( "right" )) { ?>
<td>
<?php mosLoadModules ( 'right' ); ?>
<?php mosLoadModules ( 'user2' ); ?>
</td>
<?php } ?>
notice that i have an entire cell captured
so be careful what you want to hide, as with html only certain things are allowed, so watch where you place those { } brackets, the need to be around a whole table, row, or cell... or a div if you're using css..
and the possibilities for this use are endless.. coupled with some custom defined positions, you can do just about anything using this techniqe...
and another useful thing is something like this
PHP Code:
<?php if ($option == "com_frontpage") { ?>
<td> some stuff goes here.. that will only show on frontpage</td>
<?php }
else { // DO NOTHING, or do something else
} ?>
the above willl only show the the cell when the user is on the frontpage
com_frontpage this can also be used for hiding the module positions if you're that lazy and don't feel like doing all this backend stuff, hiding modules on certain pages, you can use the com_simpleboard... or whatever, and have mambo hide a certain section according to the page it's on, couple that with some more com_whatevers, and you can make Mambo really dance..

....
you can see this in action on my alm_classy template..
hope this helps..
