Template:Information field/doc: Difference between revisions
More actions
No edit summary |
m format |
||
| Line 28: | Line 28: | ||
|6stat=optional- | |6stat=optional- | ||
|name= | |name=Information field | ||
|desc=This template is used by advanced template writers for customizing the current set of [[commons:Infoboxes|Infobox]] templates, by adding fields to one of existing Infobox templates, like for example {{tl|Artwork}}. For example see for example templates in [[:Category:Infobox templates: based on Artwork template]]. In most cases, this template should not be used directly in the in the file namespace, but rather be used to create customized infobox templates that are used in the file namespace. | |desc=This template is used by advanced template writers for customizing the current set of [[commons:Infoboxes|Infobox]] templates, by adding fields to one of existing Infobox templates, like for example {{tl|Artwork}}. For example see for example templates in [[:Category:Infobox templates: based on Artwork template]]. In most cases, this template should not be used directly in the in the file namespace, but rather be used to create customized infobox templates that are used in the file namespace. | ||
|namespace=file | |namespace=file | ||
|usergroup=all | |usergroup=all | ||
|placement=Within | |placement=Within templates as {{Tl|Information}}, e.g. at <code>Other fields=</code>, or elsewhere (see the last example) | ||
|usage-notes=Allows to specify any additional description line - see [[#Examples|examples]] | |usage-notes=Allows to specify any additional description line - see [[#Examples|examples]] | ||
The following possible notations are equivalent:<pre><nowiki> | The following possible notations are equivalent:<pre><nowiki> | ||
{{Information field|name=nnn|value=vvv}} | {{Information field|name=nnn|value=vvv}} | ||
{{Information field|Value=vvv|Name=nnn}} | {{Information field|Value=vvv|Name=nnn}} | ||
{{Information field|1=nnn|2=vvv}} | |||
{{Information field|nnn|vvv}} | {{Information field|nnn|vvv}} | ||
{{ | {{InFi|nnn|vvv}} | ||
</nowiki></pre> | </nowiki></pre> | ||
| Line 59: | Line 60: | ||
|author={{Ut|Author name}} | |author={{Ut|Author name}} | ||
|permission= | |permission= | ||
| | |other versions= | ||
| | |other fields={{Information field|name=Used colors|value= | ||
{{Tbc|1|255|0|0|red}} | {{Tbc|1|255|0|0|red}} | ||
{{Tbc|4|0|0|255|blue}} }} }}</nowiki></pre> | {{Tbc|4|0|0|255|blue}} }} }}</nowiki></pre> | ||
| Line 69: | Line 70: | ||
|author={{Ut|Example|Author name}} | |author={{Ut|Example|Author name}} | ||
|permission= | |permission= | ||
| | |other versions= | ||
| | |other fields={{Information field|name=Used colors|value= | ||
{{Tbc|1|255|0|0|red}} | {{Tbc|1|255|0|0|red}} | ||
{{Tbc|4|0|0|255|blue}}}}}} | {{Tbc|4|0|0|255|blue}}}}}} | ||
| Line 103: | Line 104: | ||
<pre><nowiki>{{Artwork | <pre><nowiki>{{Artwork | ||
|Artist = Artist name | |Artist = Artist name | ||
{{InFi|{{color||Artists nationality}}|{{color||unknown}}}} | |||
|Title = Title | |Title = Title | ||
|Year = {{other date|between|1503|1505}} | |Year = {{other date|between|1503|1505}} | ||
|Technique = {{technique|oil|poplar panel}} | |Technique = {{technique|oil|poplar panel}} | ||
{{InFi|{{Color||Example for inbetween row}}|{{Color||additional descripton}}}} | |||
|Dimensions = {{size|cm|76.8|53}} | |Dimensions = {{size|cm|76.8|53}} | ||
|Source = source | |Source = source | ||
| Line 116: | Line 119: | ||
{{Artwork | {{Artwork | ||
|Artist = Artist name | |Artist = Artist name | ||
{{InFi|{{color||Artists nationality}}|{{color||unknown}}}} | |||
|Title = Title | |Title = Title | ||
|Year = {{other date|between|1503|1505}} | |Year = {{other date|between|1503|1505}} | ||
|Technique = {{technique|oil|poplar panel}} | |Technique = {{technique|oil|poplar panel}} | ||
{{InFi|{{Color||Example for inbetween row}}|{{Color||additional descripton}}}} | |||
|Dimensions = {{size|cm|76.8|53}} | |Dimensions = {{size|cm|76.8|53}} | ||
|Source = source | |Source = source | ||
| Line 125: | Line 130: | ||
{{Information field|Field Name 1|Field Value 1}} | {{Information field|Field Name 1|Field Value 1}} | ||
{{Information field|Field Name 2|Field Value 2}} | {{Information field|Field Name 2|Field Value 2}} | ||
{{Information field|Field Name 3|Field Value 3}} | {{Information field|Field Name 3|Field Value 3}} | ||
}} | }} | ||
<includeonly> | <includeonly> | ||
Revision as of 08:12, 11 October 2014
This template is used by advanced template writers for customizing the current set of Infobox templates, by adding fields to one of existing Infobox templates, like for example {{Artwork}}. For example see for example templates in Category:Infobox templates: based on Artwork template. In most cases, this template should not be used directly in the in the file namespace, but rather be used to create customized infobox templates that are used in the file namespace.
Usage
{{Information field |name= |value= }}
Or use the shorthand
Allows to specify any additional description line - see examples
The following possible notations are equivalent:{{Information field|name=nnn|value=vvv}}
{{Information field|Value=vvv|Name=nnn}}
{{Information field|1=nnn|2=vvv}}
{{Information field|nnn|vvv}}
{{InFi|nnn|vvv}}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
nameName 1 | Name of the field. It will appear in bold on the left side of the table. | none | required | |
valueValue 2 | Contents of the field. It will appear on the right side of the table. | none | required | |
class | class parameter used with name field: <td style="{{{style|}}}" class="fileinfo-paramfield {{{class|}}}" id="{{{id|}}}">{{{name}}}</td> | empty | optional | |
style | style parameter used with name field: <td style="{{{style|}}}" class="fileinfo-paramfield {{{class|}}}" id="{{{id|}}}">{{{name}}}</td> | empty | optional | |
id | id parameter used with name field: <td style="{{{style|}}}" class="fileinfo-paramfield {{{class|}}}" id="{{{id|}}}">{{{name}}}</td> | empty | optional | |
classvalue | class parameter used with value field: <td><span class="{{{classvalue|}}}">{{{value}}}</span></td> | empty | optional | |
Additional information
The template is intended to be used in the following namespaces: the File namespace
The template is intended to be used by the following user groups: all users
Placement:
Within templates as {{Information}}, e.g. at Other fields=, or elsewhere (see the last example)
See also
Examples
{{Information
|description=description
|date=2011-11-11
|source={{Own}}
|author={{Ut|Author name}}
|permission=
|other versions=
|other fields={{Information field|name=Used colors|value=
{{Tbc|1|255|0|0|red}}
{{Tbc|4|0|0|255|blue}} }} }}
| Description | description |
| Date | |
| Source | Own work |
| Author | Author name |
| Used colors | Template:Tbc Template:Tbc |
{{Artwork
|Artist = Artist name
|Title = Title
|Year = {{other date|between|1503|1505}}
|Technique = {{technique|oil|poplar panel}}
|Dimensions = {{size|cm|76.8|53}}
|Source = source
|Other versions =
|Other fields = {{Information field|Name=Field Name|Value=Field Value}}
}}will produce
{{Artwork
|Artist = Artist name
{{InFi|{{color||Artists nationality}}|{{color||unknown}}}}
|Title = Title
|Year = {{other date|between|1503|1505}}
|Technique = {{technique|oil|poplar panel}}
{{InFi|{{Color||Example for inbetween row}}|{{Color||additional descripton}}}}
|Dimensions = {{size|cm|76.8|53}}
|Source = source
|Other versions =
|Other fields =
{{Information field|Field Name 1|Field Value 1}}
{{Information field|Field Name 2|Field Value 2}}
{{Information field|Field Name 3|Field Value 3}}
}}will produce