Jump to content

Template:Columns-list

From The Sonic the Hedgehog Wiki


[edit]

Documentation


Page Module:Hatnote/styles.css has no content.

Template:Tsh Lua error in Module:Lua_banner at line 113: attempt to index field 'edit' (a nil value).

Template:Columns-list turns a list into a list with columns. It is a wrapper for {{div col}}, except it wraps the template by allowing for the content to be in the template rather than above and below.

Use[edit source]

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
Template:Yes Template:Yes Template:Yes Template:Yes Template:Yes
columns Template:Yes Template:Yes Template:Yes Template:Yes Template:Yes
break-before
break-after
break-inside
Template:Yes Template:Maybe Template:Yes Template:Yes Template:Yes
Script error: No such module "Navbar".

Examples[edit source]

Here is an example:

{{columns-list|colwidth=35em|
* [[George Washington]]
* [[John Adams]]
* [[Thomas Jefferson]]
* [[James Madison]]
* [[James Monroe]]
}}

which would render as: Template:Clear Script error: No such module "Template wrapper".

HTML classes and CSS styles can also be added with the |class= and |style= parameters. For example:

{{columns-list|colwidth=15em|style=width: 600px; font-style: italic;|
* [[All About Lily Chou-Chou]]
* [[April Story]]
* [[Hana and Alice|Hana & Alice]]
* [[Hōtai Club]]
* [[The Kon Ichikawa Story]]
* [[Love Letter (1995 film)|Love Letter]]
* [[New York, I Love You]]
* [[Picnic (1996 film)|Picnic]]
* [[Rainbow Song]]
* [[Swallowtail (film)|Swallowtail]]
}}

which would render as: Script error: No such module "Template wrapper".

This template also works with numbered lists as its "text". For example:

{{columns-list|colwidth=35em|
# [[George Washington]]
# [[John Adams]]
# [[Thomas Jefferson]]
# [[James Madison]]
# [[James Monroe]]
}}

Script error: No such module "Template wrapper".

The template, in fact, works with everything since all it does is wrap the text provided around a block to be divided into columns by CSS. Do not stop at wikitext listsTemplate:Sndmore advanced lists generated by the HTML templates will work too!

Error messages[edit source]

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[edit source]

Tracking category[edit source]

See also[edit source]

Template:Column-generating template families Template:Navbox top

Horizontal list
Page Template:Mono/styles.css has no content.{{hlist}}
{{hlist|item1 |item2 |...}}

Template:Hlist

Horizontal list
Page Template:Mono/styles.css has no content.{{flatlist}}
{{flatlist|
* item1
* item2
* ...}}

Template:Flatlist

Horizontal list
Page Template:Mono/styles.css has no content.{{cslist}}
{{cslist|item1 |item2 |...}}

Template:Cslist

Page Template:Mono/styles.css has no content.{{bold list}}
{{bold list|item1 |item2 |...}}

Script error: No such module "Bold list".

Bulleted list
Page Template:Mono/styles.css has no content.{{bulleted list}}
{{bulleted list|item1 |item2 |...}}
  • item1
  • item2
  • ...
Numeric ordered list
Page Template:Mono/styles.css has no content.{{ordered list}}
{{Ordered list|first |second |...}}

Template:Ordered list

Alphabetic ordered list
Page Template:Mono/styles.css has no content.{{ordered list}}
{{Ordered list|list_style_type=lower-alpha |first |second |...}}

Template:Ordered list

Unbulleted list
Page Template:Mono/styles.css has no content.{{unbulleted list}}
{{unbulleted list|item1 |item2 |...}}

Template:Unbulleted list

Unbulleted list
Page Template:Mono/styles.css has no content.{{plainlist}}
{{plainlist|
* item1
* item2
* ...}}

Template:Plainlist

Glossary or definition list
Page Template:Mono/styles.css has no content.{{glossary}}
(glossary, description, definition, association)
{{glossary}}

{{term|first term}}{{defn|first description}}
{{term|second term}}{{defn|second description}}
{{term|...}}{{defn|....}}
Page Template:Mono/styles.css has no content.{{glossary end}}

Template:Glossary Template:TermTemplate:Defn Template:TermTemplate:Defn Template:TermTemplate:Defn Template:Glossary end

Bulleted list to flow around an image
Page Template:Mono/styles.css has no content.{{flowlist}}
[[File:Bad Title Example.png|left|thumb|100px]]

{{flowlist|
*item1
*item2
*...}}

File:Bad Title Example.png

Template:Flowlist

Ordered list in columns
Page Template:Mono/styles.css has no content.{{columns-list}}
{{columns-list|colwidth=5em|
# first
# second
# third
# ...}}

Script error: No such module "Template wrapper".

Template:Navbox bottom

Turns a list into a list with columns. It is a wrapper for {{div col}}, except it wraps the template by allowing for the content to be in the template rather than above and below.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Content1

Specifies the content to divide into columns

Stringoptional
Columns / Column widthcolwidth

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

Default
30
Example
20em
Stringoptional
CSS stylestyle

Specifies any custom styling.

Example
width: 600px; font-style: italic;
Stringoptional
HTML classclass

Specifies any class or multiple space-delimited classes.

Example
plainlist nowrap
Stringoptional