Welcome to the ScoutWiki Network

Difference between revisions of "Template:Columns-list/doc"

From ScoutWiki, For Everyone, Everywhere involved with Scouting and Guiding...
Jump to: navigation, search
m (note Lua module used, add template category)
 
m (1 revision imported)
 
(No difference)

Latest revision as of 15:00, 18 March 2019

{{#invoke:Message box|mbox}} {{#invoke:Hatnote|hatnote}}

{{#invoke:Lua banner|main}}

This template is for use in a list in the body of an article, rather than in a navigation template like Template:Navbox. Based on Template:Reflist, but different in that the text to be displayed is manually created rather than a list of references.

Use

The width of each column may be specified using |colwidth= and a value in ems.

{{columns-list|colwidth=width|
Text (usually a list)
}}

Here, width specifies the width of the columns, and determines dynamically the number of columns based on screen width; more columns will be shown on wider displays.

If |colwidth= is not specified, the default width of 30em will be used.

This template uses CSS3 multiple-column layout, which is not supported by all Web browsers.

CSS3 multiple-column layout browser support
Property Internet
Explorer
Firefox Safari Chrome Opera
column-width
column-count
≥ 10
(2012)
≥ 1.5
(2005)
≥ 3
(2007)
≥ 1
(2008)
≥ 11.1
(2011)
columns ≥ 10
(2012)
≥ 9
(2011)
≥ 3
(2007)
≥ 1
(2008)
≥ 11.1
(2011)
break-before
break-after
break-inside
≥ 10
(2012)
No No No ≥ 11.1
(2011)
{{#invoke:Navbar|navbar}}

Examples

Here is an example:

<source lang=text>{{#invoke:Check for unknown parameters|check|unknown=|preview=Page using Template:Div col with unknown parameter "_VALUE_"; use colwidth= to specify column size |ignoreblank=y | colwidth | content | gap | rules | small | style }}{{#invoke:Check for unknown parameters|check|unknown=|preview=Page using Template:Columns-list with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | gap | rules | small | style }}</source>

which would render as:

{{#invoke:Check for unknown parameters|check|unknown=|preview=Page using Template:Div col with unknown parameter "_VALUE_"; use colwidth= to specify column size |ignoreblank=y | colwidth | content | gap | rules | small | style }}{{#invoke:Check for unknown parameters|check|unknown=|preview=Page using Template:Columns-list with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | gap | rules | small | style }}

CSS styles can also be added in addition to the colwidth parameter. For example:

<source lang=text>{{#invoke:Check for unknown parameters|check|unknown=|preview=Page using Template:Div col with unknown parameter "_VALUE_"; use colwidth= to specify column size |ignoreblank=y | colwidth | content | gap | rules | small | style }}{{#invoke:Check for unknown parameters|check|unknown=|preview=Page using Template:Columns-list with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | gap | rules | small | style }}</source>

which would render as:

{{#invoke:Check for unknown parameters|check|unknown=|preview=Page using Template:Div col with unknown parameter "_VALUE_"; use colwidth= to specify column size |ignoreblank=y | colwidth | content | gap | rules | small | style }}{{#invoke:Check for unknown parameters|check|unknown=|preview=Page using Template:Columns-list with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | gap | rules | small | style }}

Error messages

Use of the no-longer-supported parameter |cols=, or use of the first unnamed parameter (aka |1=) along with |2= or a second unnamed parameter for the template's content, will generate a red error message. To fix this error, use |colwidth= instead of attempting to specify the number of columns.

The presence of an equals sign within the template's content can also cause display problems and red error messages. To fix this problem, add |1= in front of the template's content.

Redirects

Tracking category

See also

Column-generating template families

{{#invoke:Message box|mbox}} <section begin="table" />

Family Type
Handles wiki
 table code?main}}
Start template Column divider End template
"Col" Table Yes {{Col-begin}} or
{{Col-begin-small}}
{{Col-break}}
{{Col-2}} .. {{Col-5}}
{{Col-end}}
"Col-float" CSS float Yes {{Col-float}} {{Col-float-break}} {{Col-float-end}}
"Columns" Table No {{Columns}}
"Columns-list" CSS columns Yes {{Columns-list}} (wrapper)
"Columns-start" CSS float Yes {{Columns-start}} {{Column}} {{Columns-end}}
"Div col" CSS columns Yes {{Div col}} {{Div col end}}

main}} I.e., can the columns handle the wiki markup {| | || |- |} used to create tables? If not, templates that produce these elements (such as {{(!}}, {{!}}, {{!!}}, {{!-}}, {{!)}}) and/or HTML tags (<table>...</table>, <tr>...</tr>, etc.) will need to be used instead.<section end="table" />