Template:Sidebar

From SprezzOSWiki
Revision as of 11:51, 8 February 2013 by Dank (talk | contribs) (Created page with "{{documentation subpage}} This template is intended to be a metatemplate for sidebar templates, which are vertically-aligned Wi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{{#ifeq: sidebar | doc

 | 

{{

   #ifeq: show | show
   | {{
 {{#switch:
 {{#if: 
   | 
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = ambox | talk = tmbox | user = ombox | wikipedia = ombox | file | image = imbox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | portal = ombox | book = ombox | other | #default = ombox

}} | type = notice | image = | imageright = | class = | style = | textstyle = | text = This is a documentation subpage for Template:Sidebar.
It contains usage information, categories, interlanguage links and other content that is not part of the original {{ #if: | {{{text2}}} | {{ #if: | {{{text1}}} | {{ #ifeq: Template | User | template template page | {{ #if: Template |template page|article}}}}}}}}. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}

   }}{{
   #if: 
   | 
   | {{#ifexist:Template:Sidebar|[[Category:{{
     #switch: Template
     | Template  = Template
     | User      = User
     | #default  = Wikipedia
   }} documentation pages]]|}}
 }}

| }}

This template is intended to be a metatemplate for sidebar templates, which are vertically-aligned navigation templates. The sidebar is usually positioned on the right-hand side of a page, in the same way as the {{infobox{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} template is aligned for infoboxes.

{{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

{{#ifeq: sidebar | doc

 | 

{{

   #ifeq: show | show
   | {{
 {{#switch:
 {{#if: 
   | 
   | {{#if: 
     | 
       {{#ifeq:|
       | talk
       |  
       }}
     | 
       {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }}
   }}

| main | = ambox | talk = tmbox | user = ombox | wikipedia = ombox | file | image = imbox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | portal = ombox | book = ombox | other | #default = ombox

}} | type = notice | image = | imageright = | class = | style = | textstyle = | text = This is a documentation subpage for Template:Sidebar.
It contains usage information, categories, interlanguage links and other content that is not part of the original {{ #if: | {{{text2}}} | {{ #if: | {{{text1}}} | {{ #ifeq: Template | User | template template page | {{ #if: Template |template page|article}}}}}}}}. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}

   }}{{
   #if: 
   | 
   | {{#ifexist:Template:Sidebar|[[Category:{{
     #switch: Template
     | Template  = Template
     | User      = User
     | #default  = Wikipedia
   }} documentation pages]]|}}
 }}

| }}

This template is intended to be a metatemplate for sidebar templates, which are vertically-aligned navigation templates. The sidebar is usually positioned on the right-hand side of a page, in the same way as the {{infobox{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} template is aligned for infoboxes.

{{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

Template loop detected: Template:Sidebar

(parameters with infrequent use omitted)

{{Sidebar
| name = {{subst:PAGENAME}}
| outertitle = 
| topimage = 
| pretitle = 
| title = 
| image = 

| headingstyle = 
| contentstyle = 

| heading1 = 
| content1 = 

| heading2 = 
| content2 = 

| heading3 = 
| content3 = 

<!-- ... up to 35th -->

| heading35 = 
| content35 = 
}}

Parameters

No parameters are required unless {{navbar}} links (Template:Small) are to appear at the bottom of the sidebar, in which case the Template:Para parameter is needed (see entry in the table immediately below).

Principal

Parameter Explanation
Template:Para The sidebar's name, i.e., the name following "Template:" in the page's name. Required for the {{navbar}} links at the bottom of the sidebar to function correctly, unless these are omitted (see Template:Para at the bottom of this table). It is recommended to use {{subst:PAGENAME}} for this field.
Template:Para Use to place a title for the sidebar immediately above the sidebar.
Template:Para Use to place an image at the top of the sidebar, i.e., above any Template:Para included.

Full wikisyntax expected (i.e., [[File:...]]).
To add a caption below the image, use Template:Para.

Template:Para Use to place a line such as "Part of the X series on" before the title.
Template:Para Use to place a title for the sidebar at the top of the sidebar (immediately below the Template:Para, if used).
Template:Para Use to place an image between the Template:Para (if used) and first section.

As with Template:Para, full wikisyntax expected (i.e., [[File:...]]).
To add a caption below the image, use Template:Para.

Template:Para Use to alter the default CSS styling set for section headings.

To alter the CSS styling for a specific section's heading, use Template:Para, where n is the number of the section.

Template:Para Use to alter the default CSS styling set for section content.

To alter the CSS styling for a particular section's content, use Template:Para, where n is the number of the section.

Template:Para First section's heading (if needed).
Template:Para First section's content (required).
Template:Para Second section's heading (if needed).
Template:Para Second section's content (if needed).
Template:Para Third section's heading (if needed).
Template:Para Third section's content (if needed).
...... etc ......
Template:Para Currently, the last possible section heading and/or content (if needed).
Template:Para

Other parameters

Parameter Explanation
Template:Para Corresponds to Template:Para offered by {{navbox}}.

Microformat classes for the corresponding parameters.
(Template:Para (or Template:Para) applies to the sidebar as a whole.)

Template:Para Use to, e.g., add one or more portal links to the bottom of the template (by default in bold).

Use to alter default CSS styling for the corresponding parameters.
(Template:Para (or Template:Para) applies to the sidebar as a whole.)

Template:Para Use to amend the default cellspacing set for the infobox-class table with which the sidebar is built.
Template:Para Ditto the default cellpadding.
Template:Para (or Template:Para) Set to "none" (without the quotes) to remove the navigation bar links appearing at the bottom of the sidebar.
Template:Para (or Template:Para) 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{{#if:longlinkname| |longlinkname }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}, where Template:Para is the long link without its square brackets.

Use the Template:Para parameter to turn link wrapping off for the whole template.

Full blank syntax

(omitting sections 4 to penultimate)

{{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      = 

<!-- ... up to 35th -->

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

| below      = 
| belowclass = 
| belowstyle = 

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

| wraplinks = true/false
}}

Supplementary documentation

Supplementary documentation relevant to navigational functionality through 'navbar' coding in a sidebar is at Template:Navbar/doc.

See also

{{#ifeq:Sidebar|Sidebar|

ar:قالب:Sidebar arc:ܩܠܒܐ:Sidebar az:Şablon:Məlumat qutusu bg:Шаблон:Страничен панел bn:টেমপ্লেট:Sidebar bs:Šablon:Bočni stubac ca:Plantilla:Barra lateral es:Plantilla:Barra Lateral hi:साँचा:Sidebar hu:Sablon:Navoszlop id:Templat:Sidebar ja:Template:Sidebar ka:თარგი:გვერდითი ნავდაფა km:ទំព័រគំរូ:Sidebar ko:틀:사이드바 mk:Шаблон:Странична лента ne:ढाँचा:Sidebar no:Mal:Sideboks or:ଟେମ୍ପଲେଟ:Sidebar pt:Predefinição:Sidebar ro:Format:Sidebar ru:Шаблон:Боковая навигационная таблица sl:Predloga:Sidebar sk:Šablóna:Bočný panel ckb:داڕێژە:Sidebar da:Skabelon:Sidebar et:Mall:Külgteemakast fi:Malline:Sivupalkki th:แม่แบบ:Sidebar tr:Şablon:Sidebar uk:Шаблон:Бічна навігація ur:سانچہ:Sidebar yo:Àdàkọ:Sidebar zh:Template:Sidebar }}

(parameters with infrequent use omitted)

{{Sidebar
| name = {{subst:PAGENAME}}
| outertitle = 
| topimage = 
| pretitle = 
| title = 
| image = 

| headingstyle = 
| contentstyle = 

| heading1 = 
| content1 = 

| heading2 = 
| content2 = 

| heading3 = 
| content3 = 

<!-- ... up to 35th -->

| heading35 = 
| content35 = 
}}

Parameters

No parameters are required unless {{navbar}} links (Template:Small) are to appear at the bottom of the sidebar, in which case the Template:Para parameter is needed (see entry in the table immediately below).

Principal

Parameter Explanation
Template:Para The sidebar's name, i.e., the name following "Template:" in the page's name. Required for the {{navbar}} links at the bottom of the sidebar to function correctly, unless these are omitted (see Template:Para at the bottom of this table). It is recommended to use {{subst:PAGENAME}} for this field.
Template:Para Use to place a title for the sidebar immediately above the sidebar.
Template:Para Use to place an image at the top of the sidebar, i.e., above any Template:Para included.

Full wikisyntax expected (i.e., [[File:...]]).
To add a caption below the image, use Template:Para.

Template:Para Use to place a line such as "Part of the X series on" before the title.
Template:Para Use to place a title for the sidebar at the top of the sidebar (immediately below the Template:Para, if used).
Template:Para Use to place an image between the Template:Para (if used) and first section.

As with Template:Para, full wikisyntax expected (i.e., [[File:...]]).
To add a caption below the image, use Template:Para.

Template:Para Use to alter the default CSS styling set for section headings.

To alter the CSS styling for a specific section's heading, use Template:Para, where n is the number of the section.

Template:Para Use to alter the default CSS styling set for section content.

To alter the CSS styling for a particular section's content, use Template:Para, where n is the number of the section.

Template:Para First section's heading (if needed).
Template:Para First section's content (required).
Template:Para Second section's heading (if needed).
Template:Para Second section's content (if needed).
Template:Para Third section's heading (if needed).
Template:Para Third section's content (if needed).
...... etc ......
Template:Para Currently, the last possible section heading and/or content (if needed).
Template:Para

Other parameters

Parameter Explanation
Template:Para Corresponds to Template:Para offered by {{navbox}}.

Microformat classes for the corresponding parameters.
(Template:Para (or Template:Para) applies to the sidebar as a whole.)

Template:Para Use to, e.g., add one or more portal links to the bottom of the template (by default in bold).

Use to alter default CSS styling for the corresponding parameters.
(Template:Para (or Template:Para) applies to the sidebar as a whole.)

Template:Para Use to amend the default cellspacing set for the infobox-class table with which the sidebar is built.
Template:Para Ditto the default cellpadding.
Template:Para (or Template:Para) Set to "none" (without the quotes) to remove the navigation bar links appearing at the bottom of the sidebar.
Template:Para (or Template:Para) 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{{#if:longlinkname| |longlinkname }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}, where Template:Para is the long link without its square brackets.

Use the Template:Para parameter to turn link wrapping off for the whole template.

Full blank syntax

(omitting sections 4 to penultimate)

{{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      = 

<!-- ... up to 35th -->

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

| below      = 
| belowclass = 
| belowstyle = 

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

| wraplinks = true/false
}}

Supplementary documentation

Supplementary documentation relevant to navigational functionality through 'navbar' coding in a sidebar is at Template:Navbar/doc.

See also