4,225 bytes added
, 15:01, 30 June 2016
m{{Documentation subpage}}
{{Lua|Module:Sidebar}}
{{High-use| 48,000+ }}
<!---PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE--->
{{tl|Sidebar with collapsible lists}} is a version of {{tl|Sidebar}} which offers [[Help:Collapsing|collapsible]] lists as an alternative to Sidebar's ''content'' parameters.
== Usage ==
{{Generic template demo
|name={{PAGENAME}} |pretitle |title |image |above |heading1 |list1title |list1 |list2title |list2
|heading3={{{heading{{italics correction|''N''}}}}} |list3title={{{list{{italics correction|''N''}}title}}} |list3={{{list{{italics correction|''N''}}}}} |content4={{{content{{italics correction|''N''}}}}}
|below
}}
Parameters with infrequent use omitted.
<pre style="overflow:auto;">
{{Sidebar with collapsible lists
| name = {{subst:PAGENAME}}
| pretitle =
| title =
| image =
| expanded = {{{expanded|{{{1|}}}}}}
| headingstyle =
| listtitlestyle =
| liststyle =
| contentstyle = <!--(same as |liststyle = ...?)-->
| heading1 =
| list1name =
| list1title =
| list1 =
| heading2 =
| list2name =
| list2title =
| list2 =
<!-- ...... -->
| headingN = <!--(Template:Sidebar's "headingN" and/or "contentN" parameters (where -->
| contentN = <!-- N is a number) may be used to include uncollapsible lists/content)-->
<!-- ...... -->
| below =
}}
</pre>
== Parameters ==
The topmost parameters (including ''name'', ''outertitle'', ''topimage'', ''pretitle'', ''title'', ''image'', ''headingstyle'', ''contentstyle'') are described at {{tl|Sidebar}}. Other {{tlf|Sidebar}} parameters not shown here (e.g. ''navbar'') may also be used.
; ''expanded'' {{nobold|and}} ''listNname''
: ''expanded'' is used to indicate which (if any) list named ''listNname'' is shown expanded when the template is first displayed; see {{tl|Collapsible lists option}}.
; ''listtitlestyle'' {{nobold|and}} ''liststyle''
: These are the equivalent of, respectively, {{tl|Collapsible list}}'s ''titlestyle'' and ''liststyle'' parameters.
{{Sidebar with collapsible lists |list1={{{list1}}} without {{{list1title}}} |navbar=off}}
Any ''listN'' used without an accompanying ''listNtitle'' is still presented as a collapsible list under {{tlf|Collapsible list}}'s default title ("List"); see example opposite. {{smaller|''[Perhaps "listN"s without "listNtitle"s should be treated as "contentN"s..?]''}}
=== Other parameters ===
In addition to the above, the following collapsible list-related parameters are also available:
; ''listframestyle'' : Sets the framestyle (see {{tl|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.
== Handling long links ==
As with the sidebar template, {{tl|normalwraplink}} may be used to handle links that should wrap within the sidebar or otherwise need to be made to wrap, in order to prevent the sidebar from becoming too wide. Use {{tlx|normalwraplink|''longlinkname''}}, where {{para||''longlinkname''}} is the long link without its square brackets.
Use the {{para|wraplinks|true}} parameter to turn link wrapping off for the whole template.
== Examples ==
Examples of this template can be found by checking the template's [[Help:What links here|backlinks]] with [http://en.wikipedia.org/w/index.php?title=Special%3AWhatLinksHere&target=Template%3ASidebar+with+collapsible+lists&namespace=10 What links here].
== See also ==
* [http://en.wikipedia.org/w/index.php?title=Template:Sidebar_with_collapsible_lists&oldid=544228431 Last pre-Lua version]
* {{tl|Collapsible list}}
* {{tl|Collapsible lists option}}
* {{tl|Navbox with collapsible groups}}
* {{tl|Sidebar}}
* [[Wikipedia:UBLIST]], for help in using unbulleted lists in fields.
<includeonly>
{{#ifeq:{{PAGENAME}}|Sidebar with collapsible lists
| <!----ADD CATEGORIES BELOW THIS LINE, PLEASE:---->
[[Category:Sidebar templates| ]]
[[Category:Wikipedia metatemplates]]
[[Category:Navigational boxes| ]]
[[Category:Exclude in print]]
}}
</includeonly>