Template:Columns-list

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Columns-list/doc.

Display a list in multiple columns if possible, making use of horizontal space to minimize the list's height.

Usage

{{columns-list
 |1 =
 |style =
}}

Template parameters

<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

Display a list in multiple columns if possible, making use of horizontal space to minimize the list's height.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
content1 2

Content to be displayed in multiple columns (if space available). Typically a list.

Contentrequired
CSSstyle

Extra CSS styles

Lineoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

See also

Localization

This template is not intended to be localized.

Examples

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

which would render as:

CSS styles can also be added after the number of columns. For example:

{{columns-list|style=max-width: 75em; 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: