Template:Sidebar/doc: Difference between revisions
No edit summary |
|||
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{dochead}}{{wikipedia | {{dochead|header=metatemplate}}{{wikipedia}} | ||
'''Template:Sidebar''' is intended as a meta-template (a template used to construct other templates), used to build simple infoboxes and information-containing panels. | '''Template:Sidebar''' is intended as a meta-template (a template used to construct other templates), used to build simple infoboxes and information-containing panels. | ||
| Line 13: | Line 13: | ||
; <code>Row ''N''</code> (optional) | ; <code>Row ''N''</code> (optional) | ||
: Text for a single row. Up to 20 rows are supported using the template. | : Text for a single row. Up to 20 rows are supported using the template. | ||
; <code>float</code> (optional; default <code>right</code>) | |||
: Determines where on the page the sidebar goes, such as left or right. | |||
; <code>name</code> (optional) | |||
: The template's name, needed to create its view/talk/edit links. | |||
== Basic usage == | |||
Rows in a sidebar can be added by adding parameters <code>Row ''N''</code>. Up to 20 rows can be added. | |||
An optional <code>Header Row</code> and <code>Footer Row</code> may also be added. Sidebars that display complex information may have its template name passed into itself to provide navbar links. | |||
{{Sidebar | |||
| Title = Part of a series on Erv Wilson | |||
| Row 1 = '''Scales'''<br />[[mos | Moment of symmetry scales]]<br />[[Combination product sets]] | |||
| Row 2 = '''Concepts'''<br />[[Constant structure]]<br />[[Diaphonic cycle]] | |||
| Footer Row = [[:Category:Erv Wilson | Category]] | |||
| name = Sidebar Erv Wilson | |||
}} | |||
<pre>{{Sidebar | |||
| Title = Part of a series on Erv Wilson | |||
| Row 1 = '''Scales'''<br />[[mos | Moment of symmetry scales]]<br />[[Combination product sets]] | |||
| Row 2 = '''Concepts'''<br />[[Constant structure]]<br />[[Diaphonic cycle]] | |||
| Footer Row = [[:Category:Erv Wilson | Category]] | |||
| name = Sidebar Erv Wilson | |||
}}</pre> | |||
{{clear}} | |||
== Advanced usage == | |||
=== Using numlinks === | |||
The templates [[Template:numlinks]] and [[Template:numlinks 2-num]] may be used to automatically generate links for numbered pages. These templates may be placed in a <code>Row</code> or as the <code>Title</code>. This allows for the creation of simple infoboxes, without requiring the two-column nature of [[Template:Infobox]]. | |||
{{Sidebar | |||
| Title = Fractional-octave temperaments | |||
| Header Row = <hr> | |||
| Row 1 = | |||
{{Numlinks | |||
| Current Num = 19 | |||
| Link Format = %s-octave temperaments | |||
| Display Format = %s-octave | |||
| Current Page Format = %s-octave | |||
| Is Ordinal = 1 | |||
| Is Table = false}} | |||
}} | |||
<pre>{{Sidebar | |||
| Title = Fractional-octave temperaments | |||
| Header Row = <hr> | |||
| Row 1 = | |||
{{Numlinks | |||
| Current Num = 19 | |||
| Link Format = %s-octave temperaments | |||
| Display Format = %s-octave | |||
| Current Page Format = %s-octave | |||
| Is Ordinal = 1 | |||
| Is Table = false}} | |||
}}</pre> | |||
{{clear}} | |||
=== Left-side sidebars === | |||
Unlike [[Template:Infobox]], the sidebar can be placed on the left side of a page. | |||
{{Sidebar | |||
| Title = Major second | |||
| Header Row = <hr> | |||
| Row 1 = ↑ Minor 3rd | |||
| Row 2 = <div style="font-size:80%;">↑ Supermajor 2nd</div> | |||
| Row 3 = <div style="font-size:80%;">↓ Neutral 2nd</div> | |||
| Row 4 = ↓ Minor 2nd | |||
| float = left | |||
}} | |||
{{clear}} | |||
<pre>{{Sidebar | |||
| Title = Major second | |||
| Header Row = <hr> | |||
| Row 1 = ↑ Minor 3rd | |||
| Row 2 = <div style="font-size:80%;">↑ Supermajor 2nd</div> | |||
| Row 3 = <div style="font-size:80%;">duarr; Neutral 2nd</div> | |||
| Row 4 = ↓ Minor 2nd | |||
| float = left | |||
}}</pre> | |||
{{clear}} | |||
== See also == | |||
* [[:Category:Infoboxes]], some of which use this template | |||
* [[Template:Infobox]], a similar template that for displaying information that requires two columns | |||