Template:Infobox/doc: Difference between revisions

Ganaram inukshuk (talk | contribs)
see also
Ganaram inukshuk (talk | contribs)
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{dochead}}{{lua}}
{{dochead | header = metatemplate }}
{{wikipedia}}
'''{{ARTICLEROOTPAGENAME}}''' is intended as a meta-template (i.e. a template intended mainly for constructing other templates). Although using [[Module:Infobox]] directly is the primary way to create infoboxes (such as those that automatically add entries), this template can be used standalone, such as with prototyping or making simple infoboxes. See [[:Category:Infoboxes]] to see all templates that generate infoboxes.{{clear}}
'''{{ARTICLEROOTPAGENAME}}''' is intended as a meta-template (i.e. a template intended mainly for constructing other templates). Although using [[Module:Infobox]] directly is the primary way to create infoboxes (such as those that automatically add entries), this template can be used standalone, such as with prototyping or making simple infoboxes. See [[:Category:Infoboxes]] to see all templates that generate infoboxes.{{clear}}


== Parameters ==
== Parameters ==
; <code>name</code> (optional)
: The template's name, needed to create its view/talk/edit links.


; <code>Title</code> (recommended; default <code>Infobox Title</code>)
; <code>Title</code> (recommended; default <code>Infobox Title</code>)
Line 18: Line 16:
; <code>Header ''N''</code> (recommended) and <code>Data ''N''</code> (recommended)
; <code>Header ''N''</code> (recommended) and <code>Data ''N''</code> (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.
: 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.
; <code>name</code> (optional)
: The template's name, needed to create its view/talk/edit links.


== Usage ==
== Usage ==
Line 85: Line 86:
{{Clear}}
{{Clear}}


==== Using numlinks ====
=== Headerless rows ===
A row that only contains a <code>Data ''N''</code> entry and no corresponding <code>Header ''N''</code> 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.


The templates [[Template:numlinks]] and [[Template:numlinks 2-num]] may be used to automatically generate links for numbered pages.
{{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 = &larr; 5L 1s
| Right Link = 5L 3s &rarr;
| Upper Link = &uarr; 4L 2s
| Lower Link = &darr; 6L 2s
}}
 
<pre>{{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 = &larr; 5L 1s
| Right Link = 5L 3s &rarr;
| Upper Link = &uarr; 4L 2s
| Lower Link = &darr; 6L 2s
}}</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>Data</code> row or as the <code>Title</code>.


{{Infobox
{{Infobox
Line 117: Line 165:
{{clear}}
{{clear}}


If these templates are used in place of this template's <code>Link</code> parameters, it must be used as the infobox's <code>Title</code> to achieve the same formatting as using the <code>Link</code> parameters.
These templates can be used as the infobox's <code>Title</code>, producing the same result as using the infobox's <code>Link</code> parameters. As such, the <code>Link</code> parameters must not be used at the same time as using the numlinks templates as the <code>Title</code>.


{{Infobox
{{Infobox
Line 142: Line 190:


{{clear}}
{{clear}}
=== Headerless rows ===
A row that only contains a <code>Data ''N''</code> entry and no corresponding <code>Header ''N''</code> 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.
{{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 = &larr; 5L 1s
| Right Link = 5L 3s &rarr;
| Upper Link = &uarr; 4L 2s
| Lower Link = &darr; 6L 2s
}}
<pre>{{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 = &larr; 5L 1s
| Right Link = 5L 3s &rarr;
| Upper Link = &uarr; 4L 2s
| Lower Link = &darr; 6L 2s
}}</pre>{{clear}}


== See also ==
== See also ==


* [[:Category:Infoboxes]], infoboxes, some of which use this template
* [[Template:Navbox]], a similar metatemplate for navboxes
* [[Template:Navbox]], a similar metatemplate for navboxes
* [[Template:Sidebar]], a similar template that may be used for navboxes that doesn't require two columns
* [[Template:Sidebar]], a similar template that may be used for navboxes that doesn't require two columns