Open main menu

Changes

9,057 bytes added ,  13:15, 8 November 2012
m
1 revision
{{documentation subpage}}

This template is intended as a metatemplate for sidebar templates (vertically-aligned [[Wikipedia:Navigation templates|navigation (navbox)]] templates usually positioned on the right-hand sides of pages) in the same spirit as {{tl|Infobox}} for [[Wikipedia:Manual of Style/Infoboxes|infobox]] templates and {{tl|Navbox}} for navbox templates.

{{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 ==
{{sidebar
| name = {{PAGENAME}}
| outertitle = {{{outertitle}}}
| topimage = {{{topimage}}}
| topcaption = {{{topcaption}}}
| pretitle = {{{pretitle}}}
| title = {{{title}}}
| image = {{{image}}}

| above = {{{above}}}
| heading1 = {{{heading1}}}
| content1 = {{{content1}}}
| heading2 = {{{heading2}}}
| content2 = {{{content2}}}
| heading3 = {{{heading3}}}
| content3 = {{{content3}}}
| content4 = ................
| heading35 = {{{heading35}}}
| content35 = {{{content35}}}
| below = {{{below}}}

}}

Parameters with infrequent use omitted.
<pre style="overflow: auto;">
{{sidebar
| name = {{subst:PAGENAME}}
| outertitle =
| topimage =
| pretitle =
| title =
| image =

| headingstyle =
| contentstyle =

| heading1 =
| content1 =

| heading2 =
| content2 =

| heading3 =
| content3 =

...

| heading35 =
| content35 =

}}
</pre>

== Parameters ==
No parameters are required unless {{tl|navbar}} links ({{small|V - T - E}}) are to appear at the bottom of the sidebar, in which case the {{para|name}} parameter is needed (see entry in the table immediately below).

=== Principal ===
{| class="wikitable" style="line-height: 1.4em;"
! style="width: 7.0em;" | Parameter !! Explanation
|- style="vertical-align: top;"
| {{para|name}}
| The sidebar's name, i.e., the name following "Template:" in the page's name. 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.
|- style="vertical-align: top;"
| {{para|outertitle}}
| Use to place a title for the sidebar immediately above the sidebar.
|- style="vertical-align: top;"
| {{para|topimage}}
| Use to place an image at the top of the sidebar, i.e., above any {{para|title}} included.<br />
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}}
| Use to place a line such as "Part of the ''X'' series on" before the title.
|- style="vertical-align: top;"
| {{para|title}}
| Use to place a title for the sidebar at the top of the sidebar (immediately below the {{para|topimage}}, if used).
|- style="vertical-align: top;"
| {{para|image}}
| Use to place an image between the {{para|title}} (if used) and first section.<br />
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}}
| Use to alter the default [[Help:Cascading Style Sheets|CSS]] styling set for section headings.<br />
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|'''content1'''}} || First section's content (required).
|- style="vertical-align: top;"
| {{para|heading2}} || Second section's heading (if needed).
|-
| {{para|content2}} || Second section's content (if needed).
|- style="vertical-align: top;"
| {{para|heading3}} || Third section's heading (if needed).
|-
| {{para|content3}} || Third section's content (if needed).
|-
| colspan="2" | ...... etc ......
|-
| {{para|heading35}} || rowspan="2" | Currently, the last possible section heading and/or content (if needed).
|-
| {{para|content35}}
|}

=== Other parameters ===
{| class="wikitable plainlist" style="line-height: 1.4em;"
! style="width: 10.0em;" | Parameter !! Explanation
|- style="vertical-align: top;"
| {{para|above}}
| Corresponds to {{para|above}} offered by {{tl|Navbox}}.
|-
|
*{{para|bodyclass}} (or {{para|class}})
*{{para|outertitleclass}}
*{{para|topimageclass}}
*{{para|pretitleclass}}
*{{para|titleclass}}
*{{para|imageclass}}
*{{para|aboveclass}}
*{{para|headingclass}}
*{{para|contentclass}}
*{{para|belowclass}}
|
[[Wikipedia:WikiProject Microformats#What are microformats?|Microformat]] classes for the corresponding parameters.<br />
({{para|bodyclass}} (or {{para|class}}) applies to the sidebar as a whole.)
|- style="vertical-align: top;"
| {{para|below}}
| Use to, e.g., add one or more portal links to the bottom of the template (by default in bold).
|-
|
*{{para|bodystyle}} (or {{para|style}})
*{{para|outertitlestyle}}
*{{para|topimagestyle}}
*{{para|topcaptionstyle}}
*{{para|pretitlestyle}}
*{{para|titlestyle}}
*{{para|imagestyle}}
*{{para|captionstyle}}
*{{para|abovestyle}}
*{{para|headingstyle}}
*{{para|heading<sub>n</sub>style}}
*{{para|contentstyle}}
*{{para|content<sub>n</sub>style}}
*{{para|belowstyle}}
*{{para|navbarstyle}} (or {{para|tnavbarstyle}})
|
Use to alter default [[Help:Cascading Style Sheets|CSS]] styling for the corresponding parameters.<br />
({{para|bodystyle}} (or {{para|style}}) applies to the sidebar as a whole.)
|- style="vertical-align: top;"
| {{para|cellspacing}}
| Use to amend the default cellspacing set for the infobox-class table with which the sidebar is built.
|- style="vertical-align: top;"
| {{para|cellpadding}}
| Ditto the default cellpadding.
|- style="vertical-align: top;"
| {{para|navbar}} (or {{para|tnavbar}})
| Set to "none" (without the quotes) to remove the {{tl|navbar}} links appearing at the bottom of the sidebar.
|- style="vertical-align: top;"
| {{para|navbarfontstyle}} (or {{para|tnavbarfontstyle}})
| 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 ==
{{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 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.

== Full blank syntax ==
(omitting sections 4 to penultimate)

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

| outertitle =
| outertitleclass =
| outertitlestyle =

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

| pretitle =
| pretitleclass =
| pretitlestyle =
| title =
| titleclass =

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

| above =
| aboveclass =
| abovestyle =

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

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

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

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

<!--etc.-->

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

| below =
| belowclass =
| belowstyle =

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

| wraplinks = true/false
}}
</pre>

== See also ==
* {{tl|Sidebar with collapsible lists}}
* {{tl|Infobox}}
* [[Wikipedia:UBLIST]] – for help in using unbulleted lists in fields

<includeonly>{{#ifeq:{{PAGENAME}}|{{BASEPAGENAME}}|
[[Category:Exclude in print]]
[[Category:Wikipedia metatemplates]]

[[ar:قالب:Sidebar]]
[[bg:Шаблон:Страничен панел]]
[[bs:Šablon:Bočni stubac]]
[[ca:Plantilla:Barra lateral]]
[[es:Plantilla:Barra Lateral]]
[[hu:Sablon:Navoszlop]]
[[id:Templat:Sidebar]]
[[ja:Template:Sidebar]]
[[ka:თარგი:Sidebar]]
[[ko:틀:Sidebar]]
[[pt:Predefinição:Sidebar]]
[[ru:Шаблон:Боковая навигационная таблица]]
[[sk:Šablóna:Bočný panel]]
[[fi:Malline:Sivupalkki]]
[[th:แม่แบบ:Sidebar]]
[[tr:Şablon:Sidebar]]
[[uk:Шаблон:Бічна навігація]]
[[ur:Template:Sidebar]]
}}</includeonly>
Bureaucrats, developer, smwadministrator, Administrators
10,246

edits