Template:Sidebar/doc

From Xenharmonic Wiki
Jump to navigation Jump to search
This template is a metatemplate. It is used to build other templates and should not be used standalone, except for testing or simple usage. This template is implemented by the Lua module Module:Sidebar.
This template invokes the following functions: sidebar from Sidebar.
English Wikipedia has an article on:

Template:Sidebar is intended as a meta-template (a template used to construct other templates), used to build simple infoboxes and information-containing panels.

Note that the infobox and sidebar are two different styles, and that the sidebar only supports one column, not two.

Parameters

Title (recommended; default Sidebar Title)
The title to display.
Header Row and Footer Row (optional)
Content to display in a header and/or footer row.
Row N (optional)
Text for a single row. Up to 20 rows are supported using the template.
float (optional; default right)
Determines where on the page the sidebar goes, such as left or right.
name (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 Row N. Up to 20 rows can be added.

An optional Header Row and Footer Row 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
}}

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 Row or as the Title. This allows for the creation of simple infoboxes, without requiring the two-column nature of Template:Infobox.

Fractional-octave temperaments

← 18th-octave • 19th-octave • 20th-octave →
{{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}}
}}

Left-side sidebars

Unlike Template:Infobox, the sidebar can be placed on the left side of a page.

Major second

↑ Minor 3rd
↑ Supermajor 2nd
↓ Neutral 2nd
↓ Minor 2nd
{{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
}}

See also