w:c:strategywiki>NajBot m (category fix) |
m (9 revisions imported: Imported from https://strategywiki.org/) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{TemplateStyles|Template:Col/styles.css}} | |||
This template is used to split content on pages up into columns, such as in a Table of Contents page. | This template is used to split content on pages up into columns, such as in a Table of Contents page. | ||
==Usage== | ==Usage== | ||
<pre>{{col | <pre>{{col | ||
|Number of columns - 2, 3, 4 or | |Number of columns - 2, 3, 4, 5, or 6 | ||
|begin | |begin, end, noclear (optional) | ||
|Number of columns to span (optional) | |Number of columns to span (optional) | ||
}}</pre> | }}</pre> | ||
<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 | <code>begin</code> and <code>end</code> are only used at the beginning or ending of the set of columns (end will add a <code><nowiki>{{-}}</nowiki></code> after the closing div while <code>noclear</code> will not). | ||
To have content span across multiple columns, use another field with the number of columns. This number must 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. For example, [[The Legend of Zelda: A Link to the Past/Table of Contents]]. | |||
==Examples== | ==Examples== | ||
{{col|4|begin}} | {{col|4|begin}} | ||
;Two columns | |||
<pre> | <pre> | ||
{{col|2|begin}} | {{col|2|begin}} | ||
Line 20: | Line 26: | ||
</pre> | </pre> | ||
{{col|4}} | {{col|4}} | ||
;Three columns. The middle one has two smaller ones. | |||
<pre> | <pre> | ||
{{col|3|begin}} | {{col|3|begin}} | ||
Line 34: | Line 41: | ||
</pre> | </pre> | ||
{{col|4}} | {{col|4}} | ||
;Four columns. The second one spans columns two and three. | |||
<pre> | <pre> | ||
{{col|4|begin}} | {{col|4|begin}} | ||
Line 44: | Line 52: | ||
</pre> | </pre> | ||
{{col|4}} | {{col|4}} | ||
;Five columns. The first one spans columns one through three. | |||
<pre> | <pre> | ||
{{col|5|begin|3}} | {{col|5|begin|3}} | ||
Line 54: | Line 63: | ||
</pre> | </pre> | ||
{{col|4|end}} | {{col|4|end}} | ||
{{-}} | |||
;Six columns | |||
<pre> | |||
{{col|6|begin}} | |||
column 1 text | |||
{{col|6}} | |||
column 2 text | |||
{{col|6}} | |||
column 3 text | |||
{{col|6}} | |||
column 4 text | |||
{{col|6}} | |||
column 5 text | |||
{{col|6}} | |||
column 6 text | |||
{{col|6|end}} | |||
</pre> | |||
<noinclude>[[Category:Template documentation|C]]</noinclude> | <noinclude>[[Category:Template documentation|C]]</noinclude> |
Latest revision as of 18:28, 28 October 2023
This template uses TemplateStyles: |
This template is used to split content on pages up into columns, such as in a Table of Contents page.
Usage[edit source]
{{col |Number of columns - 2, 3, 4, 5, or 6 |begin, end, noclear (optional) |Number of columns to span (optional) }}
begin
and end
are only used at the beginning or ending of the set of columns (end will add a {{-}}
after the closing div while noclear
will not).
To have content span across multiple columns, use another field with the number of columns. This number must 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. For example, The Legend of Zelda: A Link to the Past/Table of Contents.
Examples[edit source]
- Two columns
{{col|2|begin}} column 1 text {{col|2}} column 2 text {{col|2|end}}
- Three columns. The middle one has two smaller ones.
{{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}}
- Four columns. The second one spans columns two and three.
{{col|4|begin}} column 1 text {{col|4|2}} columns 2-3 text {{col|4}} column 4 text {{col|4|end}}
- Five columns. The first one spans columns one through three.
{{col|5|begin|3}} column 1-3 text {{col|5}} column 4 text {{col|5}} column 5 text {{col|5|end}}
- Six columns
{{col|6|begin}} column 1 text {{col|6}} column 2 text {{col|6}} column 3 text {{col|6}} column 4 text {{col|6}} column 5 text {{col|6}} column 6 text {{col|6|end}}