Study Group and Template:Infobox: Difference between pages
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{distinguish|Template:Userbox}} | |||
{{Documentation subpage}} | |||
{{Parameter names example | |||
|name={{PAGENAME}} <!--|child |subbox |decat--> |title |above |subheader |subheader1 |subheader2={{{subheader2}}}<br/>...... | |||
|image|caption |image1|caption1 |image2|caption2={{{caption2}}}<br/>...... | |||
|header1=<div style="border-top:1px dashed #ccc;">{{{header1}}}<br/>{{nobold|( ''or'' )}}</div> | |||
|label2={{{label1}}} |data2={{{data1}}} | |||
|data3=( ''or'' ) |data4=<div style="padding-bottom:0.25em;border-bottom:1px dashed #ccc;">{{{data1}}}</div> | |||
|header5={{{header2}}}<br/><div style="padding:0.75em 0 0.5em;">{{nobold|( ''or'' )}}</div> | |||
|label6={{{label2}}} |data6={{{data2}}} | |||
|data7=( ''or'' ) |data8=<div style="padding-bottom:0.25em;border-bottom:1px dashed #ccc;">{{{data2}}}</div> | |||
|data9=<div style="padding:0.75em 0 0.5em;">( ''etc'' )</div> | |||
|below | |||
}} | |||
This template is intended as a meta template: a template used for constructing other templates. '''Note''': In general, it is not meant for use directly in an article, but can be used on a one-off basis if required. [[Help:Infobox]] contains an introduction about the recommended content and design of infoboxes; [[Wikipedia:Manual of Style/Infoboxes]] contains additional style guidelines. See [[WP:List of infoboxes]] and [[:Category:Infobox templates]] for lists of prepared topic-specific infoboxes. | |||
== Usage == | |||
{{tlf|Infobox}} is a meta-template: used to organise an actual <nowiki>{{Infobox sometopic}}</nowiki> template (like {{tl|Infobox building}}). | |||
For <code><nowiki>[[Template:Infobox sometopic]]</nowiki></code>, template code then looks like this, simplified: | |||
<pre> | |||
{{Infobox | |||
| name = {{{name|{{PAGENAME}}}}} | |||
| image = {{{image|}}} | |||
| caption1 = {{{caption|}}} | |||
| label1 = Former names | |||
| data1 = {{{former_names|}}} | |||
= | | header2 = General information | ||
| label3 = Status | |||
| data3 = {{{status|}}} | |||
... <!-- etc. --> | |||
}} | |||
</pre> | |||
== Content parameters == | |||
=== Title === | |||
There are two different ways to put a title on an infobox. One contains the title inside the infobox's border in the uppermost cell of the table, the other puts it as a caption on top of the table. You can use them both together, or just one or the other, or neither (though this is not recommended): | |||
; title : Text to put in the caption over the top of the table (or as section header before the whole content of this table, if this is a child infobox). For [[Wikipedia:Manual of Style/Accessibility#Tables|accessibility reasons]], this is the most recommended alternative. | |||
; above : Text to put within the uppermost cell of the table. | |||
; subheader(n) : additional title fields which fit below {{{title}}} and {{{above}}}, but before images. | |||
Examples: | |||
{{Infobox | |||
| name = Infobox/doc | |||
| title = Text in caption over infobox | |||
| subheader = Subheader of the infobox | |||
| header = (the rest of the infobox goes here) | |||
}} | |||
<pre style="overflow:auto"> | |||
{{Infobox | |||
| name = {{subst:PAGENAME}} | |||
| title = Text in caption over infobox | |||
| subheader = Subheader of the infobox | |||
| header = (the rest of the infobox goes here) | |||
}} | |||
</pre>{{clear}} | |||
{{Infobox | |||
| name = Infobox/doc | |||
| above = Text in uppermost cell of infobox | |||
| subheader = Subheader of the infobox | |||
| subheader2 = Second subheader of the infobox | |||
| header = (the rest of the infobox goes here) | |||
}} | |||
<pre style="overflow:auto"> | |||
{{Infobox | |||
| name = {{subst:PAGENAME}} | |||
| above = Text in uppermost cell of infobox | |||
| subheader = Subheader of the infobox | |||
| subheader2 = Second subheader of the infobox | |||
| header = (the rest of the infobox goes here) | |||
}} | |||
</pre>{{clear}} | |||
=== Illustration images === | |||
; image(n) : images to display at the top of the template. Use full image syntax, for example <nowiki>[[File:example.png|200px|alt=Example alt text]]</nowiki>. Image is centered by default. See [[WP:ALT]] for more on alt text. | |||
; caption(n) : Text to put underneath the images. | |||
=== Main data === | |||
; header(n) : Text to use as a header in row n. | |||
; label(n) : Text to use as a label in row n. | |||
; data(n) : Text to display as data in row n. | |||
== Porting to other MediaWikis == | |||
The infobox template requires the [[:mw:Extension:Scribunto|Scribunto]] extension. [[Wikipedia:WikiProject Transwiki|WikiProject Transwiki]] has a version of this template that has been modified to work on other MediaWikis. | |||
== TemplateData == | |||
{{TemplateData header}} | |||
<templatedata> | |||
{ | |||
"description": "This template is intended as a meta template, a template used for constructing other templates. In general, it is not meant for use directly in an article but can be used on a one-off basis if required.", | |||
"format": "{{_\n| ________________ = _\n}}\n", | |||
"params": { | |||
"title": { | |||
"label": "Title", | |||
"description": "Title displayed above the infobox", | |||
"type": "string", | |||
"suggested": true | |||
} | |||
}, | |||
"paramOrder": [ | |||
"title" | |||
] | |||
} | |||
</templatedata> | |||
==See also== | |||
* [[Module:Infobox]], the [[WP:LUA|Lua]] module on which this template is based | |||
* [[Module:Check for unknown parameters]] | |||
* {{tl|Infobox3cols}} | |||
* {{tl|Navbox}} and {{tl|Sidebar}} | |||
* [[Wikipedia:List of infoboxes|List of infoboxes]] | |||
* [[:Module:InfoboxImage]] | |||
* Maintenance categories: | |||
** [[:Category:Articles which use infobox templates with no data rows]] ({{PAGESINCATEGORY:Articles which use infobox templates with no data rows|pages}}) | |||
** [[:Category:Pages which use embedded infobox templates with the title parameter]] ({{PAGESINCATEGORY:Pages which use embedded infobox templates with the title parameter|pages}}) | |||
<includeonly>{{Sandbox other|| | |||
[[Category:Infobox templates| ]] | |||
[[Category:Wikipedia metatemplates|Infobox]] | |||
[[Category:Templates generating microformats]] | |||
[[Category:Templates that add a tracking category]] | |||
[[Category:Lua-based infobox templates]] | |||
}}</includeonly> | |||
==Tracking categories== | |||
* {{clc|Articles with missing Wikidata information}} |
Revision as of 04:24, 27 August 2021
Template:Distinguish Template:Documentation subpage Template:Parameter names example
This template is intended as a meta template: a template used for constructing other templates. Note: In general, it is not meant for use directly in an article, but can be used on a one-off basis if required. Help:Infobox contains an introduction about the recommended content and design of infoboxes; Wikipedia:Manual of Style/Infoboxes contains additional style guidelines. See WP:List of infoboxes and Category:Infobox templates for lists of prepared topic-specific infoboxes.
Usage[edit]
- REDIRECT Template:Template link with link off
Template:Redirect category shell is a meta-template: used to organise an actual {{Infobox sometopic}} template (like
- REDIRECT Template:Template link
Template:Redirect category shell).
For [[Template:Infobox sometopic]]
, template code then looks like this, simplified:
{{Infobox | name = {{{name|{{PAGENAME}}}}} | image = {{{image|}}} | caption1 = {{{caption|}}} | label1 = Former names | data1 = {{{former_names|}}} | header2 = General information | label3 = Status | data3 = {{{status|}}} ... <!-- etc. --> }}
Content parameters[edit]
Title[edit]
There are two different ways to put a title on an infobox. One contains the title inside the infobox's border in the uppermost cell of the table, the other puts it as a caption on top of the table. You can use them both together, or just one or the other, or neither (though this is not recommended):
- title
- Text to put in the caption over the top of the table (or as section header before the whole content of this table, if this is a child infobox). For accessibility reasons, this is the most recommended alternative.
- above
- Text to put within the uppermost cell of the table.
- subheader(n)
- additional title fields which fit below {{{title}}} and {{{above}}}, but before images.
Examples:
Template:Distinguish Template:Documentation subpage Template:Parameter names example
This template is intended as a meta template: a template used for constructing other templates. Note: In general, it is not meant for use directly in an article, but can be used on a one-off basis if required. Help:Infobox contains an introduction about the recommended content and design of infoboxes; Wikipedia:Manual of Style/Infoboxes contains additional style guidelines. See WP:List of infoboxes and Category:Infobox templates for lists of prepared topic-specific infoboxes.
Usage[edit]
- REDIRECT Template:Template link with link off
Template:Redirect category shell is a meta-template: used to organise an actual {{Infobox sometopic}} template (like
- REDIRECT Template:Template link
Template:Redirect category shell).
For [[Template:Infobox sometopic]]
, template code then looks like this, simplified:
{{Infobox | name = {{{name|{{PAGENAME}}}}} | image = {{{image|}}} | caption1 = {{{caption|}}} | label1 = Former names | data1 = {{{former_names|}}} | header2 = General information | label3 = Status | data3 = {{{status|}}} ... <!-- etc. --> }}
Content parameters[edit]
Title[edit]
There are two different ways to put a title on an infobox. One contains the title inside the infobox's border in the uppermost cell of the table, the other puts it as a caption on top of the table. You can use them both together, or just one or the other, or neither (though this is not recommended):
- title
- Text to put in the caption over the top of the table (or as section header before the whole content of this table, if this is a child infobox). For accessibility reasons, this is the most recommended alternative.
- above
- Text to put within the uppermost cell of the table.
- subheader(n)
- additional title fields which fit below Text in caption over infobox and {{{above}}}, but before images.
Examples:
Template loop detected: Template:Infobox
{{Infobox | name = {{subst:PAGENAME}} | title = Text in caption over infobox | subheader = Subheader of the infobox | header = (the rest of the infobox goes here) }}
Template loop detected: Template:Infobox
{{Infobox | name = {{subst:PAGENAME}} | above = Text in uppermost cell of infobox | subheader = Subheader of the infobox | subheader2 = Second subheader of the infobox | header = (the rest of the infobox goes here) }}
Illustration images[edit]
- image(n)
- images to display at the top of the template. Use full image syntax, for example [[File:example.png|200px|alt=Example alt text]]. Image is centered by default. See WP:ALT for more on alt text.
- caption(n)
- Text to put underneath the images.
Main data[edit]
- header(n)
- Text to use as a header in row n.
- label(n)
- Text to use as a label in row n.
- data(n)
- Text to display as data in row n.
Porting to other MediaWikis[edit]
The infobox template requires the Scribunto extension. WikiProject Transwiki has a version of this template that has been modified to work on other MediaWikis.
TemplateData[edit]
Template:TemplateData header <templatedata> {
"description": "This template is intended as a meta template, a template used for constructing other templates. In general, it is not meant for use directly in an article but can be used on a one-off basis if required.",
"format": "Template:\n\n", "params": { "title": { "label": "Title", "description": "Title displayed above the infobox", "type": "string", "suggested": true } }, "paramOrder": [ "title" ] } </templatedata>
See also[edit]
- Module:Infobox, the Lua module on which this template is based
- Module:Check for unknown parameters
- REDIRECT Template:Template link
Template:Redirect category shell
- REDIRECT Template:Template link
Template:Redirect category shell and
- REDIRECT Template:Template link
Template:Redirect category shell
- List of infoboxes
- Module:InfoboxImage
- Maintenance categories:
Tracking categories[edit]
{{Infobox | name = {{subst:PAGENAME}} | title = Text in caption over infobox | subheader = Subheader of the infobox | header = (the rest of the infobox goes here) }}
Template:Distinguish Template:Documentation subpage Template:Parameter names example
This template is intended as a meta template: a template used for constructing other templates. Note: In general, it is not meant for use directly in an article, but can be used on a one-off basis if required. Help:Infobox contains an introduction about the recommended content and design of infoboxes; Wikipedia:Manual of Style/Infoboxes contains additional style guidelines. See WP:List of infoboxes and Category:Infobox templates for lists of prepared topic-specific infoboxes.
Usage[edit]
- REDIRECT Template:Template link with link off
Template:Redirect category shell is a meta-template: used to organise an actual {{Infobox sometopic}} template (like
- REDIRECT Template:Template link
Template:Redirect category shell).
For [[Template:Infobox sometopic]]
, template code then looks like this, simplified:
{{Infobox | name = {{{name|{{PAGENAME}}}}} | image = {{{image|}}} | caption1 = {{{caption|}}} | label1 = Former names | data1 = {{{former_names|}}} | header2 = General information | label3 = Status | data3 = {{{status|}}} ... <!-- etc. --> }}
Content parameters[edit]
Title[edit]
There are two different ways to put a title on an infobox. One contains the title inside the infobox's border in the uppermost cell of the table, the other puts it as a caption on top of the table. You can use them both together, or just one or the other, or neither (though this is not recommended):
- title
- Text to put in the caption over the top of the table (or as section header before the whole content of this table, if this is a child infobox). For accessibility reasons, this is the most recommended alternative.
- above
- Text to put within the uppermost cell of the table.
- subheader(n)
- additional title fields which fit below {{{title}}} and Text in uppermost cell of infobox, but before images.
Examples:
Template loop detected: Template:Infobox
{{Infobox | name = {{subst:PAGENAME}} | title = Text in caption over infobox | subheader = Subheader of the infobox | header = (the rest of the infobox goes here) }}
Template loop detected: Template:Infobox
{{Infobox | name = {{subst:PAGENAME}} | above = Text in uppermost cell of infobox | subheader = Subheader of the infobox | subheader2 = Second subheader of the infobox | header = (the rest of the infobox goes here) }}
Illustration images[edit]
- image(n)
- images to display at the top of the template. Use full image syntax, for example [[File:example.png|200px|alt=Example alt text]]. Image is centered by default. See WP:ALT for more on alt text.
- caption(n)
- Text to put underneath the images.
Main data[edit]
- header(n)
- Text to use as a header in row n.
- label(n)
- Text to use as a label in row n.
- data(n)
- Text to display as data in row n.
Porting to other MediaWikis[edit]
The infobox template requires the Scribunto extension. WikiProject Transwiki has a version of this template that has been modified to work on other MediaWikis.
TemplateData[edit]
Template:TemplateData header <templatedata> {
"description": "This template is intended as a meta template, a template used for constructing other templates. In general, it is not meant for use directly in an article but can be used on a one-off basis if required.",
"format": "Template:\n\n", "params": { "title": { "label": "Title", "description": "Title displayed above the infobox", "type": "string", "suggested": true } }, "paramOrder": [ "title" ] } </templatedata>
See also[edit]
- Module:Infobox, the Lua module on which this template is based
- Module:Check for unknown parameters
- REDIRECT Template:Template link
Template:Redirect category shell
- REDIRECT Template:Template link
Template:Redirect category shell and
- REDIRECT Template:Template link
Template:Redirect category shell
- List of infoboxes
- Module:InfoboxImage
- Maintenance categories:
Tracking categories[edit]
{{Infobox | name = {{subst:PAGENAME}} | above = Text in uppermost cell of infobox | subheader = Subheader of the infobox | subheader2 = Second subheader of the infobox | header = (the rest of the infobox goes here) }}
Illustration images[edit]
- image(n)
- images to display at the top of the template. Use full image syntax, for example [[File:example.png|200px|alt=Example alt text]]. Image is centered by default. See WP:ALT for more on alt text.
- caption(n)
- Text to put underneath the images.
Main data[edit]
- header(n)
- Text to use as a header in row n.
- label(n)
- Text to use as a label in row n.
- data(n)
- Text to display as data in row n.
Porting to other MediaWikis[edit]
The infobox template requires the Scribunto extension. WikiProject Transwiki has a version of this template that has been modified to work on other MediaWikis.
TemplateData[edit]
Template:TemplateData header <templatedata> {
"description": "This template is intended as a meta template, a template used for constructing other templates. In general, it is not meant for use directly in an article but can be used on a one-off basis if required.",
"format": "Template:\n\n", "params": { "title": { "label": "Title", "description": "Title displayed above the infobox", "type": "string", "suggested": true } }, "paramOrder": [ "title" ] } </templatedata>
See also[edit]
- Module:Infobox, the Lua module on which this template is based
- Module:Check for unknown parameters
- REDIRECT Template:Template link
Template:Redirect category shell
- REDIRECT Template:Template link
Template:Redirect category shell and
- REDIRECT Template:Template link
Template:Redirect category shell
- List of infoboxes
- Module:InfoboxImage
- Maintenance categories: