Template:Col/Documentation: Difference between revisions

Template page
w:c:strategywiki>Prod
m (Undo revision 209452 by Garrett (talk), {{col is not a parameter, # is the first, special is the 2nd)
w:c:strategywiki>Najzere
(adding usage)
Line 1: Line 1:
This template is used on Table of Contents pages to split the pages up into columns.
This template is used to split content on pages up into columns, such as in a Table of Contents page.


==Usage==
==Usage==
Line 5: Line 5:
|Number of columns - 2, 3, 4 or 5
|Number of columns - 2, 3, 4 or 5
|begin or end (optional)
|begin or end (optional)
|Number of columns to span (optional)
}}</pre>
}}</pre>


The second parameter is only used if it is the beginning or ending of the set of columns.
<code>begin</code> and <code>end</code> are only used at the beginning or ending of the set of columns. To have content span across multiple columns, use another field with the number of columns. This number must obviously be no greater than the total number of columns, and should go after <code>begin</code> if being used on the first column. Multiple <code><nowiki>{{col}}</nowiki></code> templates can also be nested inside of each other to split individual columns into more than one column.
 
==Examples==
{{col|4|begin}}
<pre>
{{col|2|begin}}
column 1 text
{{col|2}}
column 2 text
{{col|2|end}}
</pre>
{{col|4}}
<pre>
{{col|3|begin}}
column 1 text
{{col|3}}
  {{col|2|begin}}
  column 3,1 text
  {{col|2}}
  column 3,2 text
  {{col|2|end}}
{{col|3}}
column 3 text
{{col|3|end}}
</pre>
{{col|4}}
<pre>
{{col|4|begin}}
column 1 text
{{col|4|2}}
columns 2-3 text
{{col|4}}
column 4 text
{{col|4|end}}
</pre>
{{col|4}}
<pre>
{{col|5|begin|3}}
column 1-3 text
{{col|5}}
column 4 text
{{col|5}}
column 5 text
{{col|5|end}}
</pre>
{{col|4|end}}

Revision as of 19:52, 2 March 2009

This template is used to split content on pages up into columns, such as in a Table of Contents page.

Usage

{{col
|Number of columns - 2, 3, 4 or 5
|begin or end (optional)
|Number of columns to span (optional)
}}

begin and end are only used at the beginning or ending of the set of columns. To have content span across multiple columns, use another field with the number of columns. This number must obviously be no greater than the total number of columns, and should go after begin if being used on the first column. Multiple {{col}} templates can also be nested inside of each other to split individual columns into more than one column.

Examples

{{col|2|begin}}
column 1 text
{{col|2}}
column 2 text
{{col|2|end}}
{{col|3|begin}}
column 1 text
{{col|3}}
  {{col|2|begin}}
  column 3,1 text
  {{col|2}}
  column 3,2 text
  {{col|2|end}}
{{col|3}}
column 3 text
{{col|3|end}}
{{col|4|begin}}
column 1 text
{{col|4|2}}
columns 2-3 text
{{col|4}}
column 4 text
{{col|4|end}}
{{col|5|begin|3}}
column 1-3 text
{{col|5}}
column 4 text
{{col|5}}
column 5 text
{{col|5|end}}