Template:Sidebar with collapsible lists/doc: Difference between revisions
Unlink imported Wikipedia interwiki documentation links |
Remove remaining unsupported template dependencies |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
<!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: Wikidata). --> | <!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: Wikidata). --> | ||
{{High-use| 64996 }} | {{High-use| 64996 }} | ||
{{Lua|Module:Sidebar}} | {{Lua|Module:Sidebar}} | ||
{{tl|Sidebar with collapsible lists}} is a version of | {{tl|Sidebar with collapsible lists}} is a version of <code>Template:Sidebar</code> which offers [[Help:Collapsing|collapsible]] lists in addition to Sidebar's ''content'' parameters. | ||
== Usage == | == Usage == | ||
| Line 47: | Line 46: | ||
== Parameters == | == Parameters == | ||
''The base Sidebar template is not installed on this wiki; use the parameters documented below.'' | |||
This template takes all | This template takes all <code>Template:Sidebar</code> parameters. In addition: | ||
; {{para|list<sub>n</sub>title}} | ; {{para|list<sub>n</sub>title}} | ||
: The displayed title of the collapsible list<sub>n</sub>. | : The displayed title of the collapsible list<sub>n</sub>. | ||
| Line 54: | Line 53: | ||
: The contents of the collapsible list<sub>n</sub>. | : The contents of the collapsible list<sub>n</sub>. | ||
; {{para|list<sub>n</sub>class}} | ; {{para|list<sub>n</sub>class}} | ||
: A class can be added to target a specific list either with TemplateStyles or microformats. See | : A class can be added to target a specific list either with TemplateStyles or microformats. See the shared Sidebar parameter notes. | ||
: In the context of TemplateStyles, specific list contents can be targeted like so: <code>.templateclass .listnclass .sidebar-list-title</code> for a specific list title and <code>.templateclass .listnclass .sidebar-list</code> for a specific list. | : In the context of TemplateStyles, specific list contents can be targeted like so: <code>.templateclass .listnclass .sidebar-list-title</code> for a specific list title and <code>.templateclass .listnclass .sidebar-list</code> for a specific list. | ||
; {{para|expanded}} {{nobold|and}} {{para|list<sub>n</sub>name}} | ; {{para|expanded}} {{nobold|and}} {{para|list<sub>n</sub>name}} | ||
: {{para|expanded}} is used to indicate which (if any) list named {{para|list<sub>n</sub>name}} is shown expanded when the template is first displayed; see | : {{para|expanded}} is used to indicate which (if any) list named {{para|list<sub>n</sub>name}} is shown expanded when the template is first displayed; see <code>Template:Collapsible lists option</code>. | ||
; {{para|centered list titles}} | ; {{para|centered list titles}} | ||
: Set to anything (though {{para|centered list titles|y}} or {{para|centered list titles|yes}} are idiomatic) to make the sidebar list titles centered. This works around some not-great behavior in how centered text interacts with the collapsible toggle. | : Set to anything (though {{para|centered list titles|y}} or {{para|centered list titles|yes}} are idiomatic) to make the sidebar list titles centered. This works around some not-great behavior in how centered text interacts with the collapsible toggle. | ||
| Line 65: | Line 64: | ||
== Handling long links == | == Handling long links == | ||
''The base Sidebar template is not installed on this wiki; use the parameters documented below.'' | |||
See | See the shared Sidebar parameter notes. | ||
== TemplateStyles == | == TemplateStyles == | ||
The classes available for styling, besides those listed in | The classes available for styling, besides those listed in the shared Sidebar parameter notes, are: | ||
; <code>.sidebar-collapse</code> | ; <code>.sidebar-collapse</code> | ||
| Line 82: | Line 81: | ||
== Deprecated parameters == | == Deprecated parameters == | ||
''The base Sidebar template is not installed on this wiki; use the parameters documented below.'' | |||
These parameters are deprecated for the same reason as the style parameters in | These parameters are deprecated for the same reason as the style parameters in <code>Template:Sidebar</code> template. | ||
; ''listtitlestyle'' {{nobold|and}} ''liststyle'' | ; ''listtitlestyle'' {{nobold|and}} ''liststyle'' | ||
: These are the equivalent of, respectively, {{tl|Collapsible list}}'s ''titlestyle'' and ''liststyle'' parameters. | : These are the equivalent of, respectively, {{tl|Collapsible list}}'s ''titlestyle'' and ''liststyle'' parameters. | ||
| Line 98: | Line 97: | ||
* {{diff|Template:Sidebar with collapsible lists|next|544062416|Last pre-Lua version}} | * {{diff|Template:Sidebar with collapsible lists|next|544062416|Last pre-Lua version}} | ||
* {{tl|Collapsible list}} | * {{tl|Collapsible list}} | ||
* | * <code>Template:Collapsible lists option</code> | ||
* {{tl|Navbox with collapsible groups}} | * {{tl|Navbox with collapsible groups}} | ||
* | * <code>Template:Sidebar</code> | ||
* UBLIST, for help in using unbulleted lists in fields. | * UBLIST, for help in using unbulleted lists in fields. | ||
<includeonly>{{#ifeq:{{PAGENAME}}|Sidebar with collapsible lists| | <includeonly>{{#ifeq:{{PAGENAME}}|Sidebar with collapsible lists| | ||
<!-- Categories go below this line, please; interwikis go to Wikidata, thank you! --> | <!-- Categories go below this line, please; interwikis go to Wikidata, thank you! --> | ||
}}</includeonly> | }}</includeonly> | ||
Latest revision as of 23:49, 26 September 2026
| icon | This is a documentation subpage for Template:Sidebar with collapsible lists It may contain usage information, categories and other content that is not part of the original template page. |
| Warning | This template is used on approximately 84,000 pages and changes may be widely noticed. Test changes in the your own user subpage. Consider discussing changes on the talk page before implementing them. |
| File:Lua-Logo.svg | This template uses Lua: |
{{Sidebar with collapsible lists}} is a version of Template:Sidebar which offers collapsible lists in addition to Sidebar's content parameters.
Usage
[edit source]| {{{pretitle}}} |
| {{{title}}} |
|---|
| {{{image}}} |
| {{{above}}} |
| {{{heading1}}} |
| {{{headingN}}} |
| {{{contentN}}} |
| {{{below}}} |
Parameters with infrequent use omitted.
<syntaxhighlight lang="wikitext">
</syntaxhighlight>
Parameters
[edit source]The base Sidebar template is not installed on this wiki; use the parameters documented below.
This template takes all Template:Sidebar parameters. In addition:
|listntitle=- The displayed title of the collapsible listn.
|listn=- The contents of the collapsible listn.
|listnclass=- A class can be added to target a specific list either with TemplateStyles or microformats. See the shared Sidebar parameter notes.
- In the context of TemplateStyles, specific list contents can be targeted like so:
.templateclass .listnclass .sidebar-list-titlefor a specific list title and.templateclass .listnclass .sidebar-listfor a specific list. |expanded=and|listnname=|expanded=is used to indicate which (if any) list named|listnname=is shown expanded when the template is first displayed; seeTemplate:Collapsible lists option.|centered list titles=- Set to anything (though
|centered list titles=yor|centered list titles=yesare idiomatic) to make the sidebar list titles centered. This works around some not-great behavior in how centered text interacts with the collapsible toggle.
A |listn= without a |listntitle= displays the default title ("List").
Handling long links
[edit source]The base Sidebar template is not installed on this wiki; use the parameters documented below.
See the shared Sidebar parameter notes.
TemplateStyles
[edit source]The classes available for styling, besides those listed in the shared Sidebar parameter notes, are:
.sidebar-collapse- The top-level {{sidebar with collapsible lists}} class.
.sidebar-list- The class is a container when either
|listntitle=or|listn=is provided in {{sidebar with collapsible lists}}. .sidebar-list-title- The class associated with a
|listntitle=. Every list title will have this class. Use the|centered list titles=to center text instead of adding CSS here. .sidebar-list-content- The class associated with a
|listn=. Every list content will have this class.
Deprecated parameters
[edit source]The base Sidebar template is not installed on this wiki; use the parameters documented below.
These parameters are deprecated for the same reason as the style parameters in Template:Sidebar template.
- listtitlestyle and liststyle
- These are the equivalent of, respectively, {{Collapsible list}}'s titlestyle and liststyle parameters.
- listframestyle
- Sets the framestyle (see {{Collapsible list}}) for the lists.
- listNframestyle
- Sets the framestyle for listN, overriding listframestyle.
- listNtitlestyle
- Sets the titlestyle for listN, overriding listtitlestyle above.
- listNstyle
- Sets the liststyle for listN, overriding liststyle above.
See also
[edit source]- Last pre-Lua version
- {{Collapsible list}}
Template:Collapsible lists option- {{Navbox with collapsible groups}}
Template:Sidebar- UBLIST, for help in using unbulleted lists in fields.