Template:Infobox

From Ekologos Wiki
Revision as of 07:23, 31 May 2023 by Mediawiki2023 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Usage

Template:Tlf is a meta-template: used to organise an actual {{Infobox sometopic}} template (like {{Infobox building}}).

For [[Template:Infobox sometopic]], template code then looks like this, simplified: <syntaxhighlight lang="wikitext">

General information
Status...

</syntaxhighlight>

Optional control parameters

name
If this parameter is present, "view/talk/edit" links will be added to the bottom of the infobox pointing to the named page, prefixed by Template: if no namespace is specified. You may use the value {{subst:PAGENAME}}; 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 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 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".
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.
autoheaders
If this is set to any non-blank value, headers which are not followed by data fields are suppressed. See the "hiding headers when all its data fields are empty" section for more details.

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 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.

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.

Template parameters

This template has custom formatting.

ParameterDescriptionTypeStatus
Titletitle

Title displayed above the infobox

Stringsuggested
Imageimage

Image illustrating the topic. Use full image syntax.

Example
[[File:example.png|200px|alt=Example alt text]]
Contentsuggested
Captioncaption

caption for the image

Contentsuggested