I have a Joomla 2.5 page, and the frontpage should be without a leftmenu and the rest of the site with one. (i would ask this in the joomla forum, but it seems to be down)
If i set up my page like this (very simply sketched):
<div id="container">
<div id="left"></div>
<div id="content"></div>
</div>
You usually set the width of the left and the content, and float it left and right.
If you just set the left div to float left, and have no width of the content div, i can style the ul tags to set the left divs width, as it will expand to the ul width.
This however makes the content wrap around the left menu, if the content is higher than the leftmenu.
What is the best way to do this? Is there a joomla php constant i can read to see if the left menu is set to be shown, or can it be made purely by CSS somehow. (and if both exists, which is better?)
There is a simple solution for you – collapsible module positions. In index.php you want to do something like this:
What this does is check to see if there are any modules in the left module position. If there are, then it adds the code in and displays the modules. If not, it completely skips the code and does not display at all on the page so you don’t end up with useless empty divs on your page.
Now you can use the module manager to assign modules to the pages you want them on. Any position that is not being used is simply ignored.