Template:Infobox/doc: Difference between revisions
Content deleted Content added
m 1 revision imported |
De-Wikipediaify |
||
Line 1:
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{distinguish|Template:Userbox|Template:Navbox}}
{{#ifeq:{{SUBPAGENAME}}|sandbox||{{High-use}}}}
{{Lua|Module:Infobox}}
Line 17:
}}
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. [[w:Help:Infobox|Help:Infobox]] contains an introduction about the recommended content and design of infoboxes; [[w:Wikipedia:Manual of Style/Infoboxes|Wikipedia:Manual of Style/Infoboxes]] contains additional style guidelines. See [[
== Usage ==
{{tlf|Infobox}} is a meta-template: used to organise an actual <nowiki>{{Infobox sometopic}}</nowiki> template (like {{tl|Infobox
For <code><nowiki>[[Template:Infobox sometopic]]</nowiki></code>, template code then looks like this, simplified:
Line 52:
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 [[w: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.
Line 121:
</syntaxhighlight>{{clear}}
It is also possible to automatically renumber parameter names by using [[w:User:Frietjes/infoboxgap.js
There is no upper limit on numbers but there must be at most 50 between each used number.
Line 142:
</syntaxhighlight>{{clear}}
For more on #if, see [[
==== Hiding headers when all its data fields are empty ====
Line 270:
{{div col end}}
=== HTML classes
{{div col}}
; bodyclass : This parameter is inserted into the <code>class</code> attribute for the infobox as a whole.
Line 289:
; belowclass : This parameter is inserted into the <code>class</code> attribute for the infobox's '''below''' cell.
{{div col end}}
== Examples ==
Line 570 ⟶ 550:
Note that omitting the {{para|title}} parameter, and not including any text preceding the embedded infobox, may result in spurious blank table rows, creating gaps in the visual presentation. The garbage output can be suppressed using {{para|rowstyleN|display: none}}, replacing N with the data/header number.
[[w:Wikipedia:WikiProject Infoboxes/embed]] includes some links to Wikipedia articles which include infoboxes embedded within other infoboxes.
== Subboxes ==
Line 660 ⟶ 640:
== Controlling line-breaking in embedded bulletless lists ==
Template {{tlx|nbsp}} may be used with {{tlx|wbr}} and {{tlx|nowrap}} to control line-breaking in bulletless lists embedded in infoboxes
== Full blank syntax ==
Line 761 ⟶ 741:
== Porting to other MediaWikis ==
The infobox template requires the [[:mw:Extension:Scribunto|Scribunto]] extension. [[w:Wikipedia:WikiProject Transwiki|WikiProject Transwiki]] has a version of this template that has been modified to work on other MediaWikis.
== TemplateData ==
Line 800 ⟶ 780:
==Tracking categories==
* {{Category link with count|Articles using infobox templates with no data rows}}
* {{Category link with count|Pages using embedded infobox templates with the title parameter}}
==See also==
* [[Module:Infobox]], the [[w:WP:LUA|Lua]] module on which this template is based
* [[Module:Check for unknown parameters]]
* {{tl|Navbox}} and {{tl|Sidebar}}
* [[
* [[:Module:InfoboxImage]]
<includeonly>{{Sandbox other||
<!-- Categories below this line, please
[[Category:Infobox templates| ]]
}}</includeonly>
|