Tags:
create new tag
view all tags

SID-00129: Two columns with headers

Status: Answered Answered TWiki version: Perl version:
Category: CategoryRendering Server OS: Last update: 11 years ago

Hi, I am trying to make two columns on my twiki page. But i need to use the headers inside both of the columns for different catagories. Is there anyway to do this?

-- FrankColburn - 23 Feb 2009

Discussion and Answer

Use CSS or tables. Here is a table example ("view raw" to see how this works) :

Heading One

Content "one" here. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog.

Heading Two

Content "two" here. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog. The quick brown fox jumps over a lazy dog.

-- PeterThoeny - 23 Feb 2009

I have to create the same thing, but my two texts are really shorter than that. Which gives me, the second column way too closer to the first one. How do i get the second column at the place I want on the page ? Thank you

-- Mathieu Crins - 2014-01-17

I changed above example to use 50% column width. Do a "raw view" to see how.

I also enclosed the table tags in sticky tags to protect them from the WYSIWYG editor.

You could hide the tags in preferences settings you define on site level or web level, for use as in:

%COLUMN_LEFT%
 left column content
%COLUMN_RIGHT%
 right column content
%COLUMN_END%

-- Peter Thoeny - 2014-01-17

Thank you Peter wink

-- Mathieu Crins - 2014-01-20

Hi,

I managed to achieve two column format using the table tag as shown above. However, as a newbie, I was not able to decode the "hiding of the tags" into variables at the site level. Do I understand it correctly that I should define twiki variables like

    • Set COLUMN_LEFT = ... and here the star table tag ...?

and then let them expand at the proper place in the topic page? How should I define the COLUMN_LEFT variable so that the tags are assigned properly - I have to escape the &lt and &gt characters so that they are not used for starting a table at the assignement line. So I tried to use the %ENTITY{ ... }% to encode the tags. However, when expanding the variable later on within the topic, the encoded text is just copied into the page and no formatting is done.

This is probably very basic and simple question. Thank you a lot for any kind of hint.

-- Rostislav Chudoba - 2014-12-03

Define site level preferences variables at Main.TWikiPreferences on your site:

   * Two-column layout:
<verbatim>
      * Set COLUMN_LEFT = <table width="100%"><tr><td valign="top" width="50%">
      * Set COLUMN_RIGHT = </td><td valign="top" width="50%">
      * Set COLUMN_END = </td></tr></table>
</verbatim>

The verbatim tag avoids the layout issue in the preferences topic.

Details at TWikiVariables.

-- Peter Thoeny - 2014-12-03

      Change status to:
ALERT! 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.
SupportForm
Status Answered
Title Two columns with headers
SupportCategory CategoryRendering
TWiki version

Server OS

Web server

Perl version

Browser & version

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2014-12-03 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.