Help:Columns

From Theosophy Wiki
Jump to: navigation, search

Long lists can be broken up into columns with very little extra work, to make content more legible.

How to create multiple columns

Three special terms are used in the template that creates multiple-column layouts in a wiki article:

{{Col-begin}} begins the multi-column structure.
{{Col-break}} indicates when to begin another column. It is followed by data items and, possibly, line breaks.
{{Col-end}} ends the multi-column structure.

A width parameter added to the Col-Begin designates how much space the multi-column structure takes on the page. A width paramater on the Col-break determines what proportion of the multi-column structure that an individual column requires. Listed items may be text, individual words, wiki categories, links, images, bullet points. or numbered points. Insert line breaks using <br> to force content onto new lines. Breaks are automatic for bullet points and numbered points on lines that begin with an asterisk or number sign.

Example of three columns for bullet points

This is an example of using three columns to display bullet-point items in the left half of the space available:

  • First item
  • Second item
  • Third item
  • Fourth item
  • Fifth item
  • Sixth item
  • Seventh item



This is accomplished by using this wiki code:

{{Col-begin|width=50%}}

{{Col-break|width=33%}}
* First item
* Second item
* Third item

{{Col-break|width=33%}}
* Fourth item
* Fifth item
* Sixth item

{{Col-break|width=33%}}
* Seventh item

{{Col-end}}

Example of four columns of categories

Actors
Architects

Engineers
Farmers

Pāli scholars
Philosophers

Politicians
Scientists



Here is the code creating this 4-column layout:

{{Col-begin|width=100%}}
{{Col-break|width=25%}}
[[:Category:Actors|Actors]]<br> 
[[:Category:Architects|Architects]]  

{{Col-break|width=25%}}
[[:Category:Engineers|Engineers]]<br>
[[:Category:Farmers|Farmers]]

{{Col-break|width=25%}}
[[:Category:Pāli scholars|Pāli scholars]]<br>
[[:Category:Philosophers|Philosophers]]

{{Col-break|width=25%}}
[[:Category:Politicians|Politicians]]<br>
[[:Category:Scientists|Scientists]]

{{Col-end}}

Note that line breaks <br> are necessary to force new lines. The colon before each category prevents the article from being placed in that category. This article should not be placed in the category "Actors", for example, just because it mentions the category "Actors", which would happen without the colon.

Example of English text next to French translation

This example is taken from the French and English versions of the website of the Canadian Theosophical Association.[1]

The Theosophical Society

The Theosophical Society is composed of students, belonging to any religion in the world or to none, who are united by their approval of the Society's Objects, by their wish to remove religious antagonisms and to draw together men and women of goodwill whatsoever their religious opinions, and by their desire to study religious truths and to share the results of their studies with others.

La Société Théosophique

La Société Théosophique est composée d'étudiants, appartenant ou non, à l'une des religions dans le monde. Tous ses membres ont approuvé, en y entrant, les trois buts qui font son objet; tous sont unis par le même désir de mettre fin aux querelles religieuses, d'étudier les vérités enfouies dans l'obscurité des dogmes et de faire part du résultat de leurs recherches à tous ceux que ces questions peuvent intéresser.



Here is the code used to create this 2-column spread:

 
{{Col-begin|width=100%}}

{{Col-break|width=50%}}
The Theosophical Society<br><br>
The Theosophical Society is composed of students, belonging to any religion in the world or to none, who are united by their approval of the Society's Objects, by their wish to remove religious antagonisms and to draw together men and women of goodwill whatsoever their religious opinions, and by their desire to study religious truths and to share the results of their studies with others. 

{{Col-break|width=50%}}
La Société Théosophique<br><br>
La Société Théosophique est composée d'étudiants, appartenant ou non, à l'une des religions dans le monde. Tous ses membres ont approuvé, en y entrant, les trois buts qui font son objet; tous sont unis par le même désir de mettre fin aux querelles religieuses, d'étudier les vérités enfouies dans l'obscurité des dogmes et de faire part du résultat de leurs recherches à tous ceux que ces questions peuvent intéresser. 

{{Col-end}}


If you wanted to leave more space between the two columns, you could add another narrow column between, with blank text.

Additional information

  • Wikipedia has an article Template:Col-begin.[2]
  • This user forum gives some pros and cons about using tables and <div> for columnar layouts.[3]