Template:Sidebar: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (+-cat)
(Updated the template to include a new 'notemplate' parameter for excluding the 'Template:' part of the V, T, and E navbar links, and use of the {{!}}, {{obr}}, and {{cbr}} templates. This is from User:Bugman/Sidebar.)
(2 intermediate revisions by one other user not shown)
Line 382: Line 382:
|none |off=
|none |off=
|#default=<tr>
|#default=<tr>
<td style="text-align: right; font-size: 115%; {{{navbarstyle|{{{tnavbarstyle|}}}}}}">{{navbar|{{{name|{{PAGENAME}}}}}|mini=1|fontstyle={{{navbarfontstyle|{{{tnavbarfontstyle|}}}}}}}}</td>
<td style="text-align: right; font-size: 115%; {{{navbarstyle|{{{tnavbarstyle|}}}}}}">{{#switch: {{{notemplate|}}}
  | 1 = {{navbar|:{{#titleparts: {{{name|{{PAGENAME}}}}} | | 1}}|mini=1|fontstyle={{{navbarfontstyle|{{{tnavbarfontstyle|}}}}}}}}
  | #default = {{navbar|{{{name|{{PAGENAME}}}}}|mini=1|fontstyle={{{navbarfontstyle|{{{tnavbarfontstyle|}}}}}}}}
}}</td>
</tr>}}
</tr>}}
</table><noinclude>
</table><noinclude>{{Informative template |1=
== Goal ==
This is a template used by right side navigation box templates used for navigating article series and otherwise related articles.
__TOC__
== Usage ==
{{obr}}'''sidebar'''
{{!}} name        = {{obr}}subst:PAGENAME{{cbr}}
{{!}} ''outertitle''  =
{{!}} ''topimage''    =
{{!}} ''pretitle''    =
{{!}} ''title''        =
{{!}} ''image''        =
{{!}} ''caption''      =
{{!}} ''above''        =
{{!}} ''headingstyle'' =
{{!}} ''contentstyle'' =
{{!}} ''heading1''    =
{{!}} content1    =
{{!}} ''heading2''    =
{{!}} ''content2''    =
{{!}} ''heading3''    =
{{!}} ''content3''    =
...
{{!}} ''heading35''    =
{{!}} ''content35''    =
{{!}} ''below''        =
{{!}} ''notemplate''  =
{{cbr}}
 
The only two mandatory parameters are '''name''' (only if '''title''' is set) and '''content1'''.
 
=== Most commonly used parameters ===
 
; name:        Name of the template.  This is needed to make the V&bull;T&bull;E links ("view", "talk" and "edit") work if '''title''' is set to something else than the name of the template using this template.  Otherwise <code>{{obr}}subst:PAGENAME{{cbr}}</code> can be used.
 
; outertitle:  An title to show above the navbox.
 
; topimage:    An image to use on the right side, in full wiki code, for example <code><nowiki>[[File:Thumbs up 32px.png|32px|link=|alt=]]</nowiki></code>.
 
; topcaption:  Caption for the top image.
 
; pretitle:    Subtitle to be shown above the title, but below a top image.
 
; title:      Title to be shown below a top image.
 
; image:      Image to be shown below the title.
 
; caption:    Caption for an image.
 
; above:      Text to appear between the title title and the contents.  Could for example be a list of wiki links.
 
; heading(n):  0-35 section headings
 
; content(n):  1-35 content sections.  At least one content section must be used.
 
; below:  Optional text to show below the group/list section.
 
; notemplate:  This is a parameter for the navbar.  If set to {{param||1}}, then the navbar links will exclude the ''Template:'' part.
 
== Example ==
{{sidebar
| name      = {{PAGENAME}}
| outertitle = {{{outertitle}}}
| topimage  = {{{topimage}}}
| topcaption = {{{topcaption}}}
| pretitle  = {{{pretitle}}}
| title      = {{{title}}}
| image      = {{{image}}}
| caption    = {{{caption}}}
| above      = {{{above}}}
| heading1  = {{{heading1}}}
| content1  = {{{content1}}}
| heading2  = {{{heading2}}}
| content2  = {{{content2}}}
| heading3  = {{{heading3}}}
| content3  = {{{content3}}}
| content4  = ...
| heading35  = {{{heading35}}}
| content35  = {{{content35}}}
| below      = {{{below}}}
}}
 
<nowiki>{{sidebar
| name      = {{PAGENAME}}
| outertitle = {{{outertitle}}}
| topimage  = {{{topimage}}}
| topcaption = {{{topcaption}}}
| pretitle  = {{{pretitle}}}
| title      = {{{title}}}
| image      = {{{image}}}
| caption    = {{{caption}}}
| above      = {{{above}}}
| heading1  = {{{heading1}}}
| content1  = {{{content1}}}
| heading2  = {{{heading2}}}
| content2  = {{{content2}}}
| heading3  = {{{heading3}}}
| content3  = {{{content3}}}
| content4  = ...
| heading35  = {{{heading35}}}
| content35  = {{{content35}}}
| below      = {{{below}}}
}}</nowiki>
 
== Related templates ==
* {{tl|navbox}}
 
== External links ==
* [http://en.wikipedia.org/w/index.php?title=Template:Sidebar/doc&oldid=485548382 Template:Navbox/doc as of 4 April 2012] on English Wikipedia.
 
}}


[[Category:Navigation templates]]
[[Category:Navigation templates]]
[[Category:Undocumented templates]]
</noinclude>
</noinclude>

Revision as of 13:25, 29 June 2017

The following template description is not displayed when the template is inserted in an article.

Goal

This is a template used by right side navigation box templates used for navigating article series and otherwise related articles.

Usage

{{sidebar
| name         = {{subst:PAGENAME}}
| outertitle   = 
| topimage     = 
| pretitle     = 
| title        = 
| image        = 
| caption      = 
| above        = 

| headingstyle = 
| contentstyle = 

| heading1     = 
| content1     = 

| heading2     = 
| content2     = 

| heading3     = 
| content3     = 
...
| heading35    = 
| content35    = 

| below        = 

| notemplate   =
}}

The only two mandatory parameters are name (only if title is set) and content1.

Most commonly used parameters

name
Name of the template. This is needed to make the V•T•E links ("view", "talk" and "edit") work if title is set to something else than the name of the template using this template. Otherwise {{subst:PAGENAME}} can be used.
outertitle
An title to show above the navbox.
topimage
An image to use on the right side, in full wiki code, for example [[File:Thumbs up 32px.png|32px|link=|alt=]].
topcaption
Caption for the top image.
pretitle
Subtitle to be shown above the title, but below a top image.
title
Title to be shown below a top image.
image
Image to be shown below the title.
caption
Caption for an image.
above
Text to appear between the title title and the contents. Could for example be a list of wiki links.
heading(n)
0-35 section headings
content(n)
1-35 content sections. At least one content section must be used.
below
Optional text to show below the group/list section.
notemplate
This is a parameter for the navbar. If set to 1, then the navbar links will exclude the Template: part.

Example

{{sidebar
| name       = {{PAGENAME}}
| outertitle = {{{outertitle}}}
| topimage   = {{{topimage}}}
| topcaption = {{{topcaption}}}
| pretitle   = {{{pretitle}}}
| title      = {{{title}}}
| image      = {{{image}}}
| caption    = {{{caption}}}
| above      = {{{above}}}
| heading1   = {{{heading1}}}
| content1   = {{{content1}}}
| heading2   = {{{heading2}}}
| content2   = {{{content2}}}
| heading3   = {{{heading3}}}
| content3   = {{{content3}}}
| content4   = ...
| heading35  = {{{heading35}}}
| content35  = {{{content35}}}
| below      = {{{below}}}
}}

Related templates

External links