views:

223

answers:

4

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?

+1  A: 

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
+2  A: 

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>
Ezz
thank you ... i will vote your answer up once i get 15 + reputation
ria
+2  A: 

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.

Avinash
thanks ... i would have voted your answer but i need 15 reputation for that ... sorry
ria
i think you already have it, and you can also consider as a accepted answer.. :-)
Avinash
+1  A: 

There is a good book on Joomla!, Building Websites with Joomla! 1.5, which also covers template design - might be helpful.

Bolek Tekielski