Template:Sidebar/doc: Difference between revisions
update documentation for navbar links |
No edit summary |
||
| Line 19: | Line 19: | ||
; <code>name</code> (optional) | ; <code>name</code> (optional) | ||
: The template's name, needed to create its view/talk/edit links. | : 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'''<hr>[[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 | |||
| Header Row = <hr> | |||
| Row 1 = '''Scales'''<br />[[mos | Moment of symmetry scales]]<br />[[Combination product sets]] | |||
| Row 2 = '''Concepts'''[[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 == | == See also == | ||