Tags:
create new tag
, view all tags

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

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Forms

-- TWikiGuest - 18 Jun 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list 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

 
Change status to:
Topic revision: r2 - 2008-06-18 - ArthurClemens
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.