Cannabis Ruderalis

Content deleted Content added
Sardanaphalus (talk | contribs)
→‎Other parameters: column width, padding-lefts rather than vertical-aligns, some rephrasing, combined two rows
Sardanaphalus (talk | contribs)
amended blank syntax provided, subheading, table and Embedding formatting, replaced a couple of "infobox"s with "sidebar"s
Line 1: Line 1:
{{documentation subpage}}
{{Documentation subpage}}
{{High-use|47 000+}}
{{High-use|47 000+}}
<!-----Edit template documentation below this line----->
This template is a [[wikt:Metatemplate|metatemplate]] for the creation of sidebar templates, i.e. boxes that are [[Vertical direction|vertically]]-aligned [[Wikipedia:Navigation templates|navigation templates]]. Sidebars, like [[Wikipedia:Manual of Style/Infoboxes|infoboxes]], are usually positioned on the right-hand side of a page.


{{tl|Sidebar with collapsible lists}} is a version of {{tl|Sidebar}} that adds collapsibility to its sections, i.e. the means to show or hide sections by clicking links beside their headings.
This template is intended to be a [[wikt:metatemplate|metatemplate]] for sidebar templates, which are [[Vertical direction|vertically]]-aligned [[Wikipedia:Navigation templates|navigation templates]]. The sidebar is usually positioned on the right-hand side of a page, in the same way as the {{tlx|infobox}} template is aligned for [[Wikipedia:Manual of Style/Infoboxes|infoboxes]].

{{tl|Sidebar with collapsible lists}} adds collapsibility to a sidebar's sections, i.e., the means to show or hide sections by clicking links beside their headings.


== Usage ==
== Usage ==

{{Sidebar
{{Sidebar
| name = {{PAGENAME}}
| name = {{PAGENAME}}
Line 22: Line 23:
| heading3 = {{{heading3}}}
| heading3 = {{{heading3}}}
| content3 = {{{content3}}}
| content3 = {{{content3}}}
| content4 = ... up to 35th ...
| content4 = ''...etc...''
| heading35 = {{{heading35}}}
| heading35 = {{{heading35}}}
| content35 = {{{content35}}}
| content35 = {{{content35}}}
Line 32: Line 33:
{{Sidebar
{{Sidebar
| name = {{subst:PAGENAME}}
| name = {{subst:PAGENAME}}
| outertitle =
| topimage =
| pretitle =
| pretitle =
| title =
| title =
| image =
| image =

| headingstyle =
| headingstyle =
| contentstyle =
| contentstyle =

| above =


| heading1 =
| heading1 =
Line 50: Line 50:
| content3 =
| content3 =


<!--...up to 35th:-->
<!--etc, to:-->


| heading35 =
| heading35 =
| content35 =
| content35 =

| below =


}}
}}
Line 59: Line 61:


== Parameters ==
== Parameters ==
If [[Template:Sidebar]] is being used as a wrapper template (rather than using [[Module:Sidebar]] directly), and {{tl|navbar}} links ({{small|V - T - E}}) are to appear at the bottom of the sidebar, then the {{para|name}} parameter is needed (see entry in the table immediately below). Otherwise, no parameters are required.


No parameters are mandatory, but if the {{small|{{smallcaps|V{{dot}}T{{dot}}E}}}} {{tl|navbar}} links along the bottom of a {{tlf|Sidebar}} are to function correctly (unless their appearance is suppressed; see the ''navbar'' parameter [[#Other parameters|below]]), the parameter ''name'' needs to be set (to [[Wikipedia:Page name|the name of]] the sidebar's page). (This does not apply if the [[Lua (programming language)|Lua module]] that produces {{tlf|Sidebar}}, [[Module:Sidebar]], is being used directly.)
=== Principal ===

{| class="wikitable" style="line-height: 1.4em;"
===Principal parameters===
! style="width: 7.0em;" | Parameter !! Explanation
|- style="vertical-align: top;"
{| class="wikitable" style="line-height:1.4em;"
!style="width:13.5em<!--(cf table below)-->;padding-left:0.25em;text-align:left;"| Parameter
!style="padding-left:0.5em;text-align:left;"| Explanation
|-
| {{para|name}}
| {{para|name}}
| The sidebar's name, i.e., the name following "Template:" in the page's name. If using [[Template:Sidebar]] as a wrapper around [[Module:Sidebar]], then it is required for the {{tl|navbar}} links at the bottom of the sidebar to function correctly, unless these are omitted (see {{para|navbar}} at the bottom of this table). It is recommended to use ''<nowiki>{{subst:PAGENAME}}</nowiki>'' for this field if using the wrapper is necessary.
|style="padding-left:0.5em;"| {{br-separated entries |The sidebar's name, i.e. the name following "Template:" in the title shown at the top of the sidebar's page. |Required if the {{small|{{smallcaps|V{{dot}}T{{dot}}E}}}} {{tl|navbar}} links at the bottom of the sidebar are to function correctly, unless their appearance is suppressed (see the ''navbar'' parameter [[#Other parameters|below]]) or {{tlf|Sidebar}} is not being used as a [[Wrapper function|wrapper]] for [[Module:Sidebar]]. When {{tlf|Sidebar}} is used as a wrapper, setting {{para|name|<nowiki>{{subst:PAGENAME}}</nowiki>}} is recommended.}}
|-
|- style="vertical-align: top;"
| {{para|outertitle}}
| {{para|outertitle}}
| Use to place a title for the sidebar immediately above the sidebar.
|style="padding-left:0.5em;"| Use to place a title for the sidebar immediately above the sidebar.
|-
|- style="vertical-align: top;"
| {{para|topimage}}
| {{para|topimage}}
| Use to place an image at the top of the sidebar, i.e., above any {{para|title}} included.<br />
|style="padding-left:0.5em;"| {{br-separated entries |Use to place an image at the top of the sidebar, i.e. above {{para|title}} (if used). Full wiki syntax is expected (i.e. <code><nowiki>[[File:...]]</nowiki></code>). |To add a caption below the image, use {{para|topcaption}}.}}
|-
Full wikisyntax expected (i.e., <code><nowiki>[[File:...]]</nowiki></code>).<br />
To add a caption below the image, use {{para|topcaption}}.
|- style="vertical-align: top;"
| {{para|pretitle}}
| {{para|pretitle}}
| Use to place a line such as "Part of the ''X'' series on" before the title.
|style="padding-left:0.5em;"| Use to place a line such as "Part of the ''X'' series on" before the title.
|-
|- style="vertical-align: top;"
| {{para|title}}
| {{para|title}}
| Use to place a title for the sidebar at the top of the sidebar (immediately below the {{para|topimage}}, if used).
|style="padding-left:0.5em;"| Use to place a title for the sidebar at the top of the sidebar. (If {{para|topimage}} is used, it will appear immediately below it).
|-
|- style="vertical-align: top;"
| {{para|image}}
| {{para|image}}
| Use to place an image between the {{para|title}} (if used) and first section.<br />
|style="padding-left:0.5em;"| {{br-separated entries |Use to place an image between the {{para|title}} (if used) and first section. As with {{para|topimage}}, full wiki syntax is expected (i.e. <code><nowiki>[[File:...]]</nowiki></code>). |To add a caption below the image, use {{para|caption}}.}}
|-
As with {{para|topimage}}, full wikisyntax expected (i.e., <code><nowiki>[[File:...]]</nowiki></code>).<br />
To add a caption below the image, use {{para|caption}}.
|- style="vertical-align: top;"
| {{para|headingstyle}}
| {{para|headingstyle}}
| Use to alter the default [[Help:Cascading Style Sheets|CSS]] styling set for section headings.<br />
|style="padding-left:0.5em;"| {{br-separated entries |Use to alter the default [[Help:Cascading Style Sheets|CSS]] styling set for section headings. |To alter the CSS styling for a specific section's heading, use {{para|heading{{semisub|n}}style}}, where ''n'' is the number of the section.}}
To alter the CSS styling for a specific section's heading, use {{para|heading<sub>n</sub>style}}, where ''n'' is the number of the section.
|- style="vertical-align: top;"
| {{para|contentstyle}}
| Use to alter the default CSS styling set for section content.<br />
To alter the CSS styling for a particular section's content, use {{para|content<sub>n</sub>style}}, where ''n'' is the number of the section.
|- style="vertical-align: top;"
| {{para|heading1}} || First section's heading (if needed).
|-
|-
| {{para|contentstyle}}
| {{para|'''content1'''}} || First section's content (required).
|style="padding-left:0.5em;"| {{br-separated entries |Use to alter the default CSS styling set for section content. |To alter the CSS styling for a particular section's content, use {{para|content{{semisub|n}}style}}, where ''n'' is the number of the section.}}
|- style="vertical-align: top;"
| {{para|heading2}} || Second section's heading (if needed).
|-
|-
| {{para|heading1}}<br/>{{para|content1}}
| {{para|content2}} || Second section's content (if needed).
|style="padding-left:0.5em;"| First section's heading{{\}}content. ''content1'' is required if ''heading1'' is also to appear.
|- style="vertical-align: top;"
| {{para|heading3}} || Third section's heading (if needed).
|-
|-
| {{para|heading2}}<br/>{{para|content2}}
| {{para|content3}} || Third section's content (if needed).
|style="padding-left:0.5em;"| Second section's heading{{\}}content. (''content2'' required if ''heading2'' also to appear; etc.)
|-
|-
| {{para|heading3}}<br/>{{para|content3}}
| colspan="2" | ...... etc ......
|style="padding-left:0.5em;"| Third section's heading{{\}}content.
|-
|-
|colspan="2" style="padding-left:0.5em;"| ...... etc ......
| {{para|heading35}} || rowspan="2" | Currently, the last possible section heading and/or content (if needed).
|-
|-
| {{para|content35}}
| {{para|heading35}}<br/>{{para|content35}}
|style="padding-left:0.5em;"| Currently, the last possible section heading and/or content.
|}
|}


=== Other parameters ===
===Other parameters===
{| class="wikitable plainlist" style="line-height:1.4em;"
{| class="wikitable plainlist" style="line-height:1.4em;"
!style="width:13.5em;padding-left:0.25em;text-align:left;"| Parameter
!style="width:13.5em<!--(cf table above)-->;padding-left:0.25em;text-align:left;"| Parameter
!style="padding-left:0.5em;text-align:left;"| Explanation
!style="padding-left:0.5em;text-align:left;"| Explanation


Line 136: Line 130:
*{{para|belowclass}}
*{{para|belowclass}}
|style="padding-left:0.5em;"|
|style="padding-left:0.5em;"|
[[Wikipedia:WikiProject Microformats#What are microformats?|Microformat]] classes for the corresponding parameters.<br/>({{para|class}} and {{para|bodyclass}} are applied across the whole sidebar.)
{{br-separated entries |[[Wikipedia:WikiProject Microformats#What are microformats?|Microformat]] classes for the corresponding parameters. |({{para|class}} and {{para|bodyclass}} are applied across the whole sidebar.)}}


|-
|-
| {{para|below}}
| {{para|below}}
|style="padding-left:0.5em;"| Same as the {{para|below}} offered by {{tl|Navbox}}.<br/>(Use, for example, to add one or more portal links to the bottom of the template (shown, by default, in bold).)
|style="padding-left:0.5em;"| {{br-separated entries |Same as the {{para|below}} offered by {{tl|Navbox}}. |(Use, for example, to add one or more portal links to the bottom of the template (shown, by default, in bold).)}}


|-
|-
Line 158: Line 152:
*{{para|content{{semisub|n}}style}}
*{{para|content{{semisub|n}}style}}
*{{para|belowstyle}}
*{{para|belowstyle}}
*{{para|navbarstyle}}&nbsp;or {{para|tnavbarstyle}}&nbsp;
*{{longitem|{{para|navbarstyle}}<br/>{{nbsp|2}}{{smaller|(or {{para|tnavbarstyle}})}}}}
|style="padding-left:0.5em;"|
|style="padding-left:0.5em;"|
Use to alter the default [[Help:Cascading Style Sheets|CSS]] styling for the corresponding parameters.<br/>({{para|style}} and {{para|bodystyle}} are applied across the whole sidebar.)
{{br-separated entries |Use to alter the default [[Help:Cascading Style Sheets|CSS]] styling for the corresponding parameters. |({{para|style}} and {{para|bodystyle}} are applied across the whole sidebar.)}}


|-
|-
Line 167: Line 161:


|-
|-
| {{para|navbar}}&nbsp;or {{para|tnavbar}}
| {{longitem|{{para|navbar}}{{nowrap|{{nbsp|2}}{{smaller|(or {{para|tnavbar}})}}}}}}
|style="padding-left:0.5em;"| Set to "none" (without quotes) to remove the {{tl|navbar}} links ({{small|{{smallcaps|V{{dot}}T{{dot}}E}}}}) appearing at the bottom of the sidebar.
|style="padding-left:0.5em;"| Set to "none" (without quotes) to remove the {{tl|navbar}} links ({{small|{{smallcaps|V{{dot}}T{{dot}}E}}}}) that otherwise appear at the bottom of the sidebar.


|-
|-
| {{para|navbarfontstyle}}&nbsp;or {{para|tnavbarfontstyle}}
| {{longitem|{{para|navbarfontstyle}}<br/>{{nbsp|2}}{{smaller|(or {{para|tnavbarfontstyle}})}}}}
|style="padding-left:0.5em;"| Use to specify the font style used by the navbar at the bottom of the sidebar (see {{tl|navbar}} for options available).
|style="padding-left:0.5em;"| Use to specify the font style used by the navbar at the bottom of the sidebar (see {{tl|navbar}} for options available).
|}
|}


== Handling long links ==
== Handling long links ==

{{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.
{{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.
Use the {{para|wraplinks|true}} parameter to turn link wrapping off for the whole template.


==Embedding==
== Embedding ==

One sidebar template can be embedded into another using the {{para|child}} parameter. This feature can be used to create a modular sidebar, or to create more well-defined and logical sections.
One sidebar template can be embedded into another using the {{para|child}} parameter. This feature can be used to create a modular sidebar, or to create more well-defined and logical sections.
{{sidebar
{{Sidebar
| title = Top level title
| title = Top-level title
| content1 = {{sidebar
| content1 =
| child = yes
{{Sidebar |child=yes
| title = First subsection
| title = First subsection
| heading1 = Heading 1.1
| heading1 = Heading 1.1
| content1 = Content 1.1
| content1 = Content 1.1
}}
}}
| content2 = {{sidebar
| content2 =
| child = yes
{{Sidebar |child=yes
| title = Second subsection
| title = Second subsection
| heading1 = Heading 2.1
| heading1 = Heading 2.1
| content1 = Content 2.1
| content1 = Content 2.1
}}
| below = "below" text
}}
}}
<pre style="position:relative;bottom:0.5em; overflow:auto;">
|belowstyle =
{{Sidebar
|below = Below text
| title = Top-level title
}}
| content1 =
<pre style="overflow:auto">
{{Sidebar |child=yes
{{sidebar
| title = Top level title
| content1 = {{sidebar
| child = yes
| title = First subsection
| title = First subsection
| heading1 = Heading 1.1
| heading1 = Heading 1.1
| content1 = Content 1.1
| content1 = Content 1.1
}}
}}
| content2 = {{sidebar
| content2 =
| child = yes
{{Sidebar |child=yes
| title = Second subsection
| title = Second subsection
| heading1 = Heading 2.1
| heading1 = Heading 2.1
| content1 = Content 2.1
| content1 = Content 2.1
}}
}}
| below = "below" text
|belowstyle =
|below = Below text
}}
}}
</pre>
</pre>

Note, in the examples above, the child infobox is placed in a <code>content</code> field, not a <code>heading</code> field. Notice that the section subheadings are not in bold font if bolding is not explicitly specified. To obtain bold section headings, place the child infobox in a <code>heading</code> field, either using
Note in the examples above that the child sidebar is placed in a {{code|content}} field, not a {{code|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 {{code|heading}} field, using either:
{{sidebar
{{Sidebar
| title = Top level title
| title = Top-level title
| heading1 = {{sidebar
| child = yes
| heading1 =
{{Sidebar |child=yes
| title = First subsection
| title = First subsection
| heading1 = Heading 1.1
| heading1 = Heading 1.1
| content1 = Content 1.1
| content1 = Content 1.1
}}
}}
| heading2 = {{sidebar
| heading2 =
| child = yes
{{Sidebar |child=yes
| title = Second subsection
| title = Second subsection
| heading1 = Heading 2.1
| heading1 = Heading 2.1
| content1 = Content 2.1
| content1 = Content 2.1
}}
| below = "below" text
}}
}}
<pre style="position:relative;bottom:0.5em; overflow:auto;">
|belowstyle =
{{Sidebar
|below = Below text
| title = Top-level title
}}
| heading1 =
<pre style="overflow:auto">
{{Sidebar |child=yes
{{sidebar
| title = Top level title
| heading1 = {{sidebar
| child = yes
| title = First subsection
| title = First subsection
| heading1 = Heading 1.1
| heading1 = Heading 1.1
| content1 = Content 1.1
| content1 = Content 1.1
}}
}}
| heading2 = {{sidebar
| heading2 =
| child = yes
{{Sidebar |child=yes
| title = Second subsection
| title = Second subsection
| heading1 = Heading 2.1
| heading1 = Heading 2.1
| content1 = Content 2.1
| content1 = Content 2.1
}}
}}
| below = "below" text
|belowstyle =
|below = Below text
}}
}}
</pre>
</pre>

or,
or:
{{sidebar
{{Sidebar
| title = Top level title
| title = Top-level title
| heading1 = First subsection {{sidebar
| heading1 = First subsection
| child = yes
{{Sidebar |child=yes
| heading1 = Heading 1.1
| heading1 = Heading 1.1
| content1 = Content 1.1
| content1 = Content 1.1
}}
}}
| heading2 = Second subsection {{sidebar
| heading2 = Second subsection
| child = yes
{{Sidebar |child=yes
| heading1 = Heading 2.1
| heading1 = Heading 2.1
| content1 = Content 2.1
| content1 = Content 2.1
}}
| below = "below" text
}}
}}
<pre style="position:relative;bottom:0.5em; overflow:auto;">
|belowstyle =
{{Sidebar
|below = Below text
| title = Top-level title
}}
| heading1 = First subsection
<pre style="overflow:auto">
{{Sidebar |child=yes
{{sidebar
| title = Top level title
| heading1 = First subsection {{sidebar
| child = yes
| heading1 = Heading 1.1
| heading1 = Heading 1.1
| content1 = Content 1.1
| content1 = Content 1.1
}}
}}
| heading2 = Second subsection {{sidebar
| heading2 = Second subsection
| child = yes
{{Sidebar |child=yes
| heading1 = Heading 2.1
| heading1 = Heading 2.1
| content1 = Content 2.1
| content1 = Content 2.1
}}
}}
| below = "below" text
|belowstyle =
|below = Below text
}}
}}
</pre>
</pre>

Note that omitting the {{para|title}} parameter, and not including any text preceding the embedded sidebar, may result in spurious blank table rows, creating gaps in the visual presentation.
Note that omitting the {{para|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 ==
== Full blank syntax ==
(omitting sections 4 to penultimate)
(omitting heading4/content4 to penultimate heading/content parameters)


<pre style="overflow:auto;">
<pre style="overflow:auto;">
Line 349: Line 342:
| content3 =
| content3 =


<!--...up to 35th:-->
<!--etc, to:-->


| heading35style =
| heading35style =
Line 370: Line 363:


== Supplementary documentation ==
== Supplementary documentation ==
Supplementary documentation relevant to navigational functionality through 'navbar' coding in a sidebar is at [[Template:Navbar/doc]].
Supplementary related documentation (concerning {{tl|navbar}} use within a sidebar) is at [[Template:Navbar/doc]].


== See also ==
== See also ==
* {{tl|Sidebar with collapsible lists}}
* {{tl|Sidebar with collapsible lists}}
* {{tl|Infobox}}
* {{tl|Infobox}}
* [[Wikipedia:UBLIST]], for help in using unbulleted lists in fields.
* [[Wikipedia:UBLIST]], for help using unbulleted lists within content.
<includeonly>{{#ifeq:{{PAGENAME}}|{{BASEPAGENAME}}|
<includeonly>
{{#ifeq:{{PAGENAME}}|{{BASEPAGENAME}} |
[[Category:Sidebar templates| ]]
[[Category:Sidebar templates| ]]
[[Category:Exclude in print]]
[[Category:Wikipedia metatemplates]]
[[Category:Wikipedia metatemplates]]
[[Category:Navigational boxes]]
[[Category:Navigational boxes]]
[[Category:Exclude in print]]
}}</includeonly>
}}
</includeonly>

Revision as of 10:59, 19 June 2014

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

(parameters with infrequent use omitted)

{{Sidebar
| name = {{subst:PAGENAME}}
| pretitle = 
| title = 
| image = 
| headingstyle = 
| contentstyle = 

| above = 

| heading1 = 
| content1 = 

| heading2 = 
| content2 = 

| heading3 = 
| content3 = 

<!--etc, to:-->

| heading35 = 
| content35 = 

| below = 

}}

Parameters

No parameters are mandatory, but if the ·· E {{navbar}} links along the bottom of a {{Sidebar}} are to function correctly (unless their appearance is suppressed; see the navbar parameter below), the parameter name needs to be set (to the name of the sidebar's page). (This does not apply if the Lua module that produces {{Sidebar}}, Module:Sidebar, is being used directly.)

Principal parameters

Parameter Explanation
|name= The sidebar's name, i.e. the name following "Template:" in the title shown at the top of the sidebar's page.
Required if the ·· E {{navbar}} links at the bottom of the sidebar are to function correctly, unless their appearance is suppressed (see the navbar parameter below) or {{Sidebar}} is not being used as a wrapper for Module:Sidebar. When {{Sidebar}} is used as a wrapper, setting |name={{subst:PAGENAME}} is recommended.
|outertitle= Use to place a title for the sidebar immediately above the sidebar.
|topimage= Use to place an image at the top of the sidebar, i.e. above |title= (if used). Full wiki syntax is expected (i.e. [[File:...]]).
To add a caption below the image, use |topcaption=.
|pretitle= Use to place a line such as "Part of the X series on" before the title.
|title= Use to place a title for the sidebar at the top of the sidebar. (If |topimage= is used, it will appear immediately below it).
|image= Use to place an image between the |title= (if used) and first section. As with |topimage=, full wiki syntax is expected (i.e. [[File:...]]).
To add a caption below the image, use |caption=.
|headingstyle= Use to alter the default CSS styling set for section headings.
To alter the CSS styling for a specific section's heading, use |headingTemplate:Semisubstyle=, where n is the number of the section.
|contentstyle= Use to alter the default CSS styling set for section content.
To alter the CSS styling for a particular section's content, use |contentTemplate:Semisubstyle=, where n is the number of the section.
|heading1=
|content1=
First section's heading / content. content1 is required if heading1 is also to appear.
|heading2=
|content2=
Second section's heading / content. (content2 required if heading2 also to appear; etc.)
|heading3=
|content3=
Third section's heading / content.
...... etc ......
|heading35=
|content35=
Currently, the last possible section heading and/or content.

Other parameters

Parameter Explanation
|above= Same as the |above= offered by {{Navbox}}.
  • |class= or |bodyclass=
  • |outertitleclass=
  • |topimageclass=
  • |pretitleclass=
  • |titleclass=
  • |imageclass=
  • |aboveclass=
  • |headingclass=
  • |contentclass=
  • |belowclass=

Microformat classes for the corresponding parameters.
(|class= and |bodyclass= are applied across the whole sidebar.)

|below= Same as the |below= offered by {{Navbox}}.
(Use, for example, to add one or more portal links to the bottom of the template (shown, by default, in bold).)
  • |style= or |bodystyle=
  • |outertitlestyle=
  • |topimagestyle=
  • |topcaptionstyle=
  • |pretitlestyle=
  • |titlestyle=
  • |imagestyle=
  • |captionstyle=
  • |abovestyle=
  • |headingstyle=
  • |headingTemplate:Semisubstyle=
  • |contentstyle=
  • |contentTemplate:Semisubstyle=
  • |belowstyle=
  • |navbarstyle=
      (or |tnavbarstyle=)

Use to alter the default CSS styling for the corresponding parameters.
(|style= and |bodystyle= are applied across the whole sidebar.)

|cellspacing=
|cellpadding=
Use to amend the default cellspacing / cellpadding set for the infobox-class table with which the sidebar is built.
|navbar=  (or |tnavbar=)
Set to "none" (without quotes) to remove the {{navbar}} links (·· E) that otherwise appear at the bottom of the sidebar.
|navbarfontstyle=
  (or |tnavbarfontstyle=)
Use to specify the font style used by the navbar at the bottom of the sidebar (see {{navbar}} for options available).

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

Use the |wraplinks=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.

{{Sidebar
| title = Top-level title
| content1 =
 {{Sidebar |child=yes
  | title = First subsection
  | heading1 = Heading 1.1
  | content1 = Content 1.1
 }}
| content2 =
 {{Sidebar |child=yes
  | title = Second subsection
  | heading1 = Heading 2.1
  | content1 = Content 2.1
 }}
| below = "below" text
}}

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:

{{Sidebar
| title = Top-level title
| heading1 =
 {{Sidebar |child=yes
  | title = First subsection
  | heading1 = Heading 1.1
  | content1 = Content 1.1
 }}
| heading2 =
 {{Sidebar |child=yes
  | title = Second subsection
  | heading1 = Heading 2.1
  | content1 = Content 2.1
 }}
| below = "below" text
}}

or:

{{Sidebar
| title = Top-level title
| heading1 = First subsection
 {{Sidebar |child=yes
  | heading1 = Heading 1.1
  | content1 = Content 1.1
 }}
| heading2 = Second subsection
 {{Sidebar |child=yes
  | heading1 = Heading 2.1
  | content1 = Content 2.1
 }}
| below = "below" text
}}

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)

{{Sidebar
| name = {{subst:PAGENAME}}
| class =            <!--or bodyclass-->
| style =            <!--or bodystyle-->
| width = 
| cellspacing = 
| cellpadding = 

| outertitleclass = 
| outertitlestyle = 
| outertitle = 

| topimageclass = 
| topimagestyle = 
| topimage = 
| topcaptionstyle = 
| topcaption = 

| pretitleclass = 
| pretitlestyle = 
| pretitle = 

| titleclass = 
| title = 

| imageclass = 
| imagestyle = 
| image = 
| captionstyle = 
| caption = 

| headingclass = 
| headingstyle = 
| contentclass = 
| contentstyle = 

| aboveclass = 
| abovestyle = 
| above = 

| heading1style = 
| heading1 = 
| content1style = 
| content1 = 

| heading2style = 
| heading2 = 
| content2style = 
| content2 = 

| heading3style = 
| heading3 = 
| content3style = 
| content3 = 

<!--etc, to:-->

| heading35style = 
| heading35 = 
| content35style = 
| content35 = 

| belowclass = 
| belowstyle = 
| below = 

| navbarstyle =      <!--or tnavbarstyle-->
| navbarfontstyle =  <!--or tnavbarfontstyle-->
| navbar =           <!--or tnavbar-->

| wraplinks =        <!--true or false-->

}}

Supplementary documentation

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

See also


Leave a Reply