Anonymous user
Template:Infobox/doc: Difference between revisions
From The Kodiak Republic Wiki
no edit summary
templatewikiarchive>Integer (dewikipediafying) |
templatewikiarchive>Pppery No edit summary |
||
Line 15:
}}
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]] contains an introduction about the recommended content and design of infoboxes.
== Usage ==
Line 23:
== Optional control parameters ==
; name : If this parameter is present, "view/
; child : See the [[#Embedding|Embedding]] section for details. If this is set to "yes", this child infobox should be titled but have no name parameter. This parameter is empty by default, set it to "yes" to activate it.
; subbox : See the [[#Subboxes|Subboxes]] section for details. If this is set to "yes", this subbox should be titled but have no name parameter. This parameter is empty by default, set to "yes" to activate it. It has no effect if the '''child''' parameter is also set to "yes".
Line 33:
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 as a caption it on top of the table. You can use both of them together if you like, or just one or the other, or even 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
; 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 101:
| data12 = Data D
</pre>{{clear}}
==== Making data fields optional ====
Line 121 ⟶ 119:
</pre>{{clear}}
For more on #if, see [[
==== Hiding headers when all data fields are hidden ====
Line 169 ⟶ 167:
</pre>{{clear}}
header1 will be shown if any of item1, item2, or item3 is defined. If none of the three parameters are defined the header won't be shown and no
Note that such trick may be sometimes very complex to test if there are many data items whose value depends on complex tests (or when a data row is generated by a recursive
=== Footer ===
Line 217 ⟶ 215:
This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. Multiple class names may be specified, separated by spaces, some of them being used as selectors for custom styling according to a project policy or to the skin selected in user preferences, others beig used for microformats.
To flag an infobox as containing [[w:hCard|hCard]] information, for example, add the following parameter:
<pre style="overflow:auto">
Line 233 ⟶ 231:
...and so forth. "above" and "title" can also be given classes, since these are usually used to display the name of the subject of the infobox.
See [[
== Examples ==
Line 494 ⟶ 492:
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.
== Subboxes ==
Line 583 ⟶ 579:
Note that the default padding of the parent data cell containing each subbox is still visible, so the subboxes are slightly narrower than the parent box and there's a higher vertical spacing between standard cells of the parent box than between cells of distinct subboxes.
== Full blank syntax ==
Line 681 ⟶ 674:
</pre>{{clear}}
{{Help:Infobox/user style}}
==See also==
* [[Module:Infobox]], the [[
* {{tl|Navbox}} and {{tl|Sidebar}}
* [[Wikipedia:List of infoboxes|List of infoboxes]]
Line 697 ⟶ 685:
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
[[Category:Infobox templates| ]]
[[Category:
}}</includeonly>
|