I am working on my first joomla template but there are certain things that are confusing me. I want the template to work as having three column layout in the home page and then there are two column layout pages in the website. Another page also has three column layout. So i was wondering how would I implement this runtime layout switching in my Joomla template. I have created a basic template with two column layout but I dont know how to do the runtime switching. Can someone suggest something easier and quicker?
You can create 2 templates one with two columns and one with three columns. Then you go in the administration and go in the template management (you can find it in the extensions menu), you chose the 2 columns template as the default one and then assign the three columns template to the pages that must have this one.
mck89 is right.. also you can hide areas based on how much content is in them...
Something like this (pseudo-code):
<html>
<head>
<title>My test</title>
</head>
<body>
<table>
<tr>
<td><jdoc:include type="modules" name="left" style="xhtml" /></td>
<td><jdoc:include type="modules" name="main" style="xhtml" /></td>
<?php if ($this->countModules( 'right' )) : ?>
<td><jdoc:include type="modules" name="right" style="xhtml" /></td>
<?php endif; ?>
</tr>
</table>
</body>
</html>
You can use multiple templates for one site.
Use menu assignment functionality of the joomla..
Your home page template should be default template.
And you can switch to other templates based on the menu selection.
There is a good book on Joomla!, Building Websites with Joomla! 1.5, which also covers template design - might be helpful.