Template:Sidebar/doc

This template is a metatemplate for the creation of sidebar templates, i.e. boxes that are vertically-aligned navigation templates. Sidebars, like infoboxes, are usually positioned on the right-hand side of a page.

Sidebar with collapsible lists is a version of Sidebar that adds collapsibility to its sections, i.e. the means to show or hide sections by clicking links beside their headings.

Usage (Sidebar)
(parameters with infrequent use omitted) 

Usage (Sidebar with collapsible lists)
Parameters with infrequent use omitted.



Parameters
No parameters are mandatory.

Parameters
The topmost parameters (including name, outertitle, topimage, pretitle, title, image, headingstyle, contentstyle) are described at Sidebar. Other parameters not shown here (e.g. navbar) may also be used.


 * expanded and listNname
 * expanded is used to indicate which (if any) list named listNname is shown expanded when the template is first displayed; see Collapsible lists option.


 * listtitlestyle and liststyle
 * These are the equivalent of, respectively, Collapsible list's titlestyle and liststyle parameters.

Any listN used without an accompanying listNtitle is still presented as a collapsible list under 's default title ("List"); see example opposite. [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 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, 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, where longlinkname is the long link without its square brackets.

Use the true parameter to turn link wrapping off for the whole template.

Examples
Examples of this template can be found by checking the template's backlinks with What links here.

Handling long links
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, where longlinkname is the long link without its square brackets.

Use the true parameter to turn link wrapping off for the whole template.

Embedding
One sidebar template can be embedded into another using the child parameter. This feature can be used to create a modular sidebar, or to create more well-defined and logical sections.



Note in the examples above that the child sidebar is placed in a content field, not a heading field. Notice also that the section subheadings do not appear in bold if this is not explicitly specified. To obtain bold section headings, place the child sidebar in a heading field, using either:



or:



Note that omitting the title parameter and not including any text preceding the embedded sidebar may result in the creation of gaps by spurious blank rows.

Full blank syntax
(omitting heading4/content4 to penultimate heading/content parameters)



Supplementary documentation
Supplementary related documentation (concerning navbar use within a sidebar) is at Template:Navbar/doc.