Template:Collapsible lists option

Revision as of 01:39, 17 October 2026 by Wikipedia>Danny 1994
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template includes collapsible lists.

    • To set it to display all lists when it appears (i.e. all lists expanded), use:
    •  {{BASEPAGENAME|expanded=all}} or {{BASEPAGENAME|all}}  (i.e. omitting |expanded=).
    • To set it to display one particular list while keeping the remainder collapsed (i.e. hidden apart from their headings), use:
    •  {{BASEPAGENAME|expanded=listname}} or {{BASEPAGENAME|listname}}
    • ...where listname is one of the following (do not include any quotemarks):
      • foo
      • bar
      • baz
    • [optional: ]
      For example, {{BASEPAGENAME|expanded=foo}} or {{BASEPAGENAME|foo}}
  • [optional: ]  [All lists have] / [The list named default has] been set to be shown when the template appears.
Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit "Template:Collapsible lists option/doc" to edit its documentation if it is available. (How does this work?)
Not to be confused with Template:Collapsible sections option.

{{Collapsible lists option}} is a standardized documentation template indicating how the collapsible parts of a template built from {{Sidebar with collapsible lists}} may be managed.

When this template is transcluded, the texts within square brackets will either not appear or be replaced accordingly.

Usage

{{Collapsible lists option
| expandedname =  <!--(see below)-->
| listnames =
| example =       <!--(one of the listnames)-->
| default =       <!--("all" or a listname, if either set to be shown)-->
}}

Parameters |expandedname=required, |example=, and |default= are optional.

expandedname=required

By default, template {{Collapsible lists option|listnames=...}} assumes that the template being documented allowed both a positional parameter |1= and a named parameter |expanded= to be used (usually seen by presence of {{{expanded|{{{1|}}}}}} in the wikitext of the template).

If only the named parameter is supported, then use {{Collapsible lists option|expandedname=required|listnames=...}} in the documentation, which will hide the part of documentation which talks about the positional parameter.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Collapsible lists option in articles based on its TemplateData.

TemplateData for Collapsible lists option

A standardized documentation template indicating how the collapsible parts of a template built from {{Sidebar with collapsible lists}} may be managed.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
expandedname

If set to "required", the part of the documentation which talks about the positional parameter equivalent of "expanded" will be hidden.

Auto value
required
Stringoptional
List nameslistnames

The names of the lists of the template being documented, usually given as a list itself

Example
{{hlist|foo|bar|baz}}
Contentrequired
Exampleexample

One of the listnames

Example
foo
Stringoptional
Defaultdefault

The listname that the documented template will show by default, or "all"

Auto value
all
Stringoptional

See also