Question
Hi all,
I am new to Twiki, please help on my simple question.
I would like to know how can i setup a page with left right column on the same page? I tried to use session, but it does not work at all.. Please advise.
Thanks,
Dennis
Environment
--
TWikiGuest - 18 Jun 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
On our homepage I did the most simple thing: I added a table in the text.
It goes like this:
<table id="hometable" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top"><!-- LEFT COL -->
... central content
</td><!-- END OF CENTRAL CONTENT -->
<td width="25%" valign="top" style="padding-left:2.5em;">
<!-- RIGHT COL -->
<div id="lbRightCol">
... right column content
</div><!--/#lbRightCol-->
<!-- END RIGHT COL -->
</td>
</tr>
</table>
So nothing beautiful.
For the
http://twiki.net
site I have used Yahoo Grids (
http://developer.yahoo.com/yui/grids/
)
Pages are build using page templates. One of the templates looks like this:
%STARTSECTION{"header"}%---+ %FORMFIELD{ "PageTitle" topic="%INCLUDINGTOPIC%" }%%ENDSECTION{"header"}%
%STARTSECTION{"main"}%<div id="text" class="yui-t7">
<div id="bd">
<div class="yui-ge">
<div class="yui-u first">
%ENDSECTION{"main"}%
(wide column text on the left)
%STARTSECTION{"right_col"}% </div><!--/yui-u first-->
<div class="yui-u">
%ENDSECTION{"right_col"}%
(small column text on the right)
%STARTSECTION{"footer"}% </div><!--/yui-u-->
</div><!--/yui-ge-->
</div><!--/#bd-->
</div><!--/#text-->
%ENDSECTION{"footer"}%
And the pages itself may contain:
%INCLUDE{"PageLayout" section="header"}%
%INCLUDE{"PageLayout" section="main"}%
...
%INCLUDE{"PageLayout" section="right_col"}%
---+++ Archive
<ul>
<li>2007 (12 articles)</li>
</ul>
%INCLUDE{"PageLayout" section="footer"}%
Of course this is all not fool proof. One mistype and the page will break.
Better would be to have INCLUDES to other topics like HomeRightBar:
%INCLUDE{"PageLayout" section="main"}%
%INCLUDE{"HomeCentralContent"}%
%INCLUDE{"PageLayout" section="right_col"}%
%INCLUDE{"HomeRightBar"}%
%INCLUDE{"PageLayout" section="footer"}%
Any of the above methods will work, but it depends on who is going to use the templates which one is better suited.
--
ArthurClemens - 18 Jun 2008