Template:Information field/doc: Difference between revisions
More actions
m Reverted edits by Manugokulam (talk) to last revision by Jarekt |
No edit summary |
||
| (33 intermediate revisions by 11 users not shown) | |||
| Line 1: | Line 1: | ||
{{redirects|InFi}}{{Heavily used template}} | |||
{{TemplateBox | {{TemplateBox | ||
|1=name | |1=name | ||
|1d=Name of the field. | |1d=Name of the field. It will appear in bold on the left side of the table. | ||
|1def= | |1aliases=Name / 1 | ||
|1def=none | |||
|1stat=required | |1stat=required | ||
|2=value | |2=value | ||
|2d=Contents of the field. It will appear on the table. | |2d=Contents of the field. It will appear on the right side of the table. | ||
|2aliases=Value / 2 | |||
|2def=none | |||
|2stat=required | |2stat=required | ||
|3= | |3=class | ||
|3d= | |3d=''class'' parameter used with ''name'' field: <nowiki><td style="{{{style|}}}" class="fileinfo-paramfield {{{class|}}}" id="{{{id|}}}">{{{name}}}</td></nowiki> | ||
| | |3stat=optional- | ||
|3stat=optional | |||
|name= | |4=style | ||
|desc= | |4d=''style'' parameter used with ''name'' field: <nowiki><td style="{{{style|}}}" class="fileinfo-paramfield {{{class|}}}" id="{{{id|}}}">{{{name}}}</td></nowiki> | ||
|4stat=optional- | |||
|5=id | |||
|5d=''id'' parameter used with ''name'' field: <nowiki><td style="{{{style|}}}" class="fileinfo-paramfield {{{class|}}}" id="{{{id|}}}">{{{name}}}</td></nowiki> | |||
|5stat=optional- | |||
|6=classvalue | |||
|6d=''class'' parameter used with ''value'' field: <nowiki><td><span class="{{{classvalue|}}}">{{{value}}}</span></td></nowiki> | |||
|6stat=optional- | |||
|7=stylevalue | |||
|7d=''style'' parameter used with ''value'' field: <nowiki><td style="{{{stylevalue|}}}" >{{{value}}}</td></nowiki> | |||
|7stat=optional- | |||
|name=Information field | |||
|desc=</div>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 file namespace, but rather be used to create customized infobox templates that are used in the file namespace.<div> | |||
|namespace=file | |namespace=file | ||
|usergroup=all | |usergroup=all | ||
|placement= | |placement=Within templates as {{Tl|Information}}, e.g. at <code>Other fields=</code> | ||
|usage-notes= | |||
Often together with the helper template {{T0|Nil2}}, it is used e.g. by | |||
* {{t0|Created with ...}} templates via Template:Image generation | |||
* {{t0|Taken with ...}} templates via Template:Taken with ... | |||
* {{t0|Created with code|+}} | |||
* {{t0|Igen/cbx|+}} | |||
* {{t0|hdbg|hdbg|+}} | |||
* {{t0|Tbc|+}} | |||
|usage-notes=Allows to specify any additional description line - see [[#Examples|examples]] | |||
The following possible notations are <u>equivalent</u>:<syntaxhighlight lang="wikitext"> | |||
{{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}}</syntaxhighlight> | |||
<small>All possible combinations give 64 valid variations to specify it.</small> | |||
|type= | |type= | ||
|example= | |example= | ||
|i18n-method= | |i18n-method= | ||
|i18n-desc= | |i18n-desc= | ||
|seealso={{tl|Credit line}} | |seealso=*{{tl|Nil2|+}} | ||
|setscats= | *{{tl|Credit line}} | ||
*{{Tl|Creation}} | |||
*{{Tl|Image generation}} | |||
*{{Tl|ColorString}} | |||
*{{Tl|Taken with}} and {{tl|Taken with ...}} | |||
*{{Tl|Tincture}} | |||
*{{Tl|hdbg|hbdg}} | |||
*{{Tl|Tbc}} | |||
*{{Tl|Site Tags}}, {{tl|Flickr Tags}}, and {{tl|Pixabay Tags}} | |||
|setscats=[[:Category:Information field template with formatting]] | |||
|lines= | |lines= | ||
|shorthand= | |shorthand={{((}}'''[[Template:InFi|InFi]]'''{{))}} | ||
|relieson= | |relieson= | ||
}} | }} | ||
<!-- {{Tincture|o|align=right}} --> | |||
<includeonly> | <includeonly> | ||
[[Category:Formatting templates|{{PAGENAME}}]] | [[Category:Formatting templates|{{PAGENAME}}]] | ||
[[Category:License-related tags]] | |||
</includeonly> | </includeonly> | ||
Latest revision as of 17:33, 10 August 2026
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 file namespace, but rather be used to create customized infobox templates that are used in the file namespace.
The template automatically sets the following categories: Category:Information field template with formatting
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}}
All possible combinations give 64 valid variations to specify it.
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 | |
stylevalue | style parameter used with value field: <td style="{{{stylevalue|}}}" >{{{value}}}</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=
Often together with the helper template Nil2, it is used e.g. by
- Created with ... templates via Template:Image generation
- Taken with ... templates via Template:Taken with ...
- Template:Created with code
- Template:Igen/cbx
- Template:hdbg
- Template:Tbc
See also