Quite a few people have asked me how to change the order of the columns in their s9y theme. If the theme you're using was based on the default layout then you should look for the following lines within index.tpl, which should be in your template folder.
<table id="mainpane">
<tr>
{if $leftSidebarElements > 0}
<td id="serendipityLeftSideBar" valign="top">{serendipity_printSidebar side="left"}</td>
{/if}
<td id="content" valign="top">{$CONTENT}</td>
{if $rightSidebarElements > 0}
<td id="serendipityRightSideBar" valign="top">{serendipity_printSidebar side="right"}</td>
{/if}
</tr>
</table>
If this is missing, that's ok, simply copy the index.tpl file from your default folder into the folder for the theme you're customising.
If you would like to swap the position of the left and center columns so your theme looks like my 'Carl Green' theme, simply replace the above lines with the following;
<table id="mainpane">
<tr>
<td id="content" valign="top">{$CONTENT}</td>
{if $leftSidebarElements > 0}
<td id="serendipityLeftSideBar" valign="top">{serendipity_printSidebar side="left"}</td>
{/if}
{if $rightSidebarElements > 0}
<td id="serendipityRightSideBar" valign="top">{serendipity_printSidebar side="right"}</td>
{/if}
</tr>
</table>
Alternatively. if you would like to swap your center and right columns, so that both sidebars appear on the left of your content pane, then this code will do the trick;
<table id="mainpane">
<tr>
{if $leftSidebarElements > 0}
<td id="serendipityLeftSideBar" valign="top">{serendipity_printSidebar side="left"}</td>
{/if}
{if $rightSidebarElements > 0}
<td id="serendipityRightSideBar" valign="top">{serendipity_printSidebar side="right"}</td>
{/if}
<td id="content" valign="top">{$CONTENT}</td>
</tr>
</table>
Having made these minor changes to your index.tpl, you may notice that your columns don't seem to sit right. In some themes the columns have margins or padding that needs to be adjusted to make everything fit together. This is easily done, and simply involves opening your style.css file, finding #content, #serendipityLeftSideBar, #serendipityRightSideBar and making the relevant changes.
Brian said,
Sunday, December 25. 2005 at 12:12 (Reply)
If you can contact me via email, I would like to ask you some questions on them.
Thanks!
Brian
carl said,
Sunday, December 25. 2005 at 12:28 (Reply)
Anyway, I'm always happy to help, shoot me an email at webmaster [at] carlgalloway [dot] com. I'll probably not get the opportunity to reply for another 24 hours or so. By the way, I promised another s9y forum user I'd post a series of tutorials on theme development here so keep coming back.
Way said,
Thursday, December 29. 2005 at 22:21 (Reply)
It's so nice themes and really I appreciate you job developing S9Y
I install your themes in my site, and I feel proud to use them