Here is a quick pointer as to how it is done:
You need to modify the template's index.php file so that the particular table cell or div that you want to disappear, gets enclosed in a conditional statement.
In plain talk - when a page is generated, get the code to ask if any modules required for that column. If not do not create this cell / div
example to make a right hand column disappear:
Search the index.php for the code which loads the right modules
We find the table cell which contains the code:
Code: Select all
<td>
<?php mosLoadModules ( "right" ); ?>
</td>
We then place this inside a php conditional statement like:
Code: Select all
<?php if (mosCountModules( "right" )) { ?>
<td>
<?php mosLoadModules ( "right" ); ?>
</td>
<?php } ?>
So if there are modules published on the page to position right, then the cell gets generated. If no modules are published to the right position on any given page, the cell does not get created at all.
The other important factor is that the area that you would like to expand (usually the main content area) must be flexible to stretch out to use the available space e.g. width="100%"
How easy all this is to do will depend on your template's layout and how complex it is.