Template:Infobox/doc: Difference between revisions

m 1 revision imported
m 1 revision imported
 
(One intermediate revision by one other user not shown)
Line 17: Line 17:
}}
}}


'''[[Template:Infobox]]''' 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.
'''[[Template:Infobox]]''' is intended as a [[:Category:Metatemplates|metatemplate]]: 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 [[Wikipedia:List of infoboxes]] and [[:Category:Infobox templates]] for lists of prepared topic-specific infoboxes.


== Usage ==
== Usage ==
{{tlf|Infobox}} is a meta-template: used to organise an actual <nowiki>{{Infobox sometopic}}</nowiki> template (like {{tl|Infobox building}}).  
{{tlf|Infobox}} is a meta-template: used to organise an actual <kbd>{<nowiki/>{Infobox ''topic''}<nowiki/>}</kbd> template (like {{tl|Infobox building}}).  


For <code><nowiki>[[Template:Infobox sometopic]]</nowiki></code>, template code then looks like this, simplified:
For <code><nowiki>[[Template:Infobox sometopic]]</nowiki></code>, template code then looks like this, simplified:
Line 41: Line 41:


== Optional control parameters ==
== Optional control parameters ==
; name : If this parameter is present, "view, talk and edit" links will be added to the bottom of the infobox pointing to the named page, prefixed by <code>Template:</code> if no namespace is specified. You may use the value <nowiki>{{subst:PAGENAME}}</nowiki>; however, this is rarely what you want because it will send users clicking these links in an infobox to the template code rather than the data in the infobox they probably want to change.
; name : If this parameter has a value, "view, talk and edit" links will be added to the bottom of the infobox pointing to the named page, prefixed with <kbd>Template:</kbd> if no namespace is specified. You may use the value <syntaxhighlight inline>{{subst:PAGENAME}}</syntaxhighlight>; however, this is rarely what you want because it will send users clicking these links in an infobox to the template code rather than the data in the infobox they probably want to change.
; 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.
; 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 {{para|child}} parameter is also set to "yes".
; 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 {{para|child}} parameter is also set to "yes".
; decat : If this is set to "yes", the current page will not be autocategorized in a maintenance category when the generated infobox has some problems or no visible data section. Leave empty by default or set to "yes" to activate it.
; decat : If this is set to "yes", the current page will not be autocategorized in a maintenance category when the generated infobox has some problems or no visible data section. Leave empty by default or set to "yes" to activate it.
Line 330: Line 330:
  |abovestyle  = background: #cfc;
  |abovestyle  = background: #cfc;
  |subheaderstyle =
  |subheaderstyle =
|subheaderstyle2 =
  |title        = Test Infobox
  |title        = Test Infobox
  |above        = Above text
  |above        = Above text
Line 372: Line 373:
  |abovestyle  = background: #cfc;
  |abovestyle  = background: #cfc;
  |subheaderstyle =
  |subheaderstyle =
|subheaderstyle2 =
  |title        = Test Infobox
  |title        = Test Infobox
  |above        = Above text
  |above        = Above text
Line 1,241: Line 1,243:
<!-- Categories below this line, please; interwikis at Wikidata -->
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Infobox templates| ]]
[[Category:Infobox templates| ]]
[[Category:Wikipedia metatemplates|Infobox]]
[[Category:Sidebar metatemplates|Infobox]]
[[Category:Templates generating microformats]]
[[Category:Templates generating microformats]]
[[Category:Templates that add a tracking category]]
[[Category:Templates that add a tracking category]]