Template:Infobox
- 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:Infobox.
- This template invokes the following functions: infobox from Infobox.
Parameters
Title(recommended; defaultInfobox Title)- The title text.
Direction Link(optional)- A link to the next or previous page, if the page is part of a series of related pages.
Directioncan be any of the following: Upper Left, Upper, Upper Right, Left, Right, Lower Left, Lower, Lower Right.
Header Row(optional) andFooter Row(optional)- Text for an infobox's header and footer rows, respectively.
Header N(recommended) andData N(recommended)- Text for a row's header cell and data cell. A row's header cell may be omitted for simple infoboxes. Up to 30 rows are supported using the template.
name(optional)- The template's name, needed to create its view/talk/edit links.
Usage
Infobox rows
Rows in an infobox can be added by adding parameters Header N and Row N. Up to 30 rows can be added, each with a separate header and data entry.
An optional Header Row and Footer Row may also be added. Infoboxes that display complex information may have its template name passed into itself to provide navbar links.
| Size in cents | 701.9¢ |
| Common name(s) | Just perfect 5th |
| Harmonic entropy | 3.42385 bits |
| Listen on Xencalc | |
| View • Talk • Edit | |
{{Infobox
| Title=3/2
| Header Row = <hr>
| Header 1 = Size in cents
| Data 1 = 701.9¢
| Header 2 = Common name(s)
| Data 2 = Just perfect 5th
| Header 3 = Harmonic entropy
| Data 3 = 3.42385 bits
| Footer Row = Listen on Xencalc
| name = Infobox example
}}
Basic navigation can be added by including Left Link and Right Link. Links may be omitted, such as with border cases.
Note that links are not automatically formatted; to link to the pages, brackets [[ ]] must be added.
| ← 11edo | 12edo | 13edo → |
{{Infobox
| Title=12edo
| Header 1 = Size of fifth
| Data 1 = 700¢
| Header 2 = Size of step
| Data 2 = 100¢
| Left Link = ← 11edo
| Right Link = 13edo →
}}
For pages that have two varying values, the following links may also be added: Upper Left Link, Upper Link, Upper Right Link, Lower Left Link, Lower Link, and Lower Right Link. As with the left and right links, any of these links can be omitted, such as with border cases.
Headerless rows
A row that only contains a Data N entry and no corresponding Header N is interpreted as a headerless row. This can be used as separators for grouping related information or for information that does not require a header, such as external links.
| ↑ 4L 2s | ||
| ← 5L 1s | 5L 2s | 5L 3s → |
| ↓ 6L 2s |
{{Infobox
| Title=5L 2s
| Data 1 = Generator information
| Header 2 = Bright gen
| Data 2 = 685.7¢ to 720¢
| Header 3 = Dark gen
| Data 3 = 480¢ to 514.3¢
| Data 4 = Tunings
| Header 5 = Hard tuning
| Data 5 = 17edo (gen = 705.9¢)
| Header 6 = Basic tuning
| Data 6 = 12edo (gen = 700¢)
| Header 7 = Soft tuning
| Data 7 = 19edo (gen = 694.7¢)
| Data 30 = Listen on Xenpaper
| Left Link = ← 5L 1s
| Right Link = 5L 3s →
| Upper Link = ↑ 4L 2s
| Lower Link = ↓ 6L 2s
}}
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 Data row or as the Title.
| ← 18th-octave • 19th-octave • 20th-octave → |
{{Infobox
| Title = Fractional-octave temperaments
| Header Row = <hr>
| Data 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}}
}}
These templates can be used as the infobox's Title, producing the same result as using the infobox's Link parameters. As such, the Link parameters must not be used at the same time as using the numlinks templates as the Title.
| 4L 11s | 5L 11s | 6L 11s |
| 4L 12s | 5L 12s | 6L 12s |
| 4L 13s | 5L 13s | 6L 13s |
{{Infobox
| Title =
{{Numlinks 2-num
| Current Num 1 = 5
| Current Num 2 = 12
| Link Format = %sL %ss}}
| Header 1 = '''Scale info'''
| Header 2 = Step Pattern
| Data 2 = LssLssLsssLssLsss
}}
See also
- Category:Infoboxes, infoboxes, some of which use this template
- Template:Navbox, a similar metatemplate for navboxes
- Template:Sidebar, a similar template that may be used for navboxes that doesn't require two columns
