Template:Reflist/doc
{{#switch:<translate></translate> | = {{#if:{{#ifexpr: ( {{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:reflist/doc|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}
|
{{#ifeq:show |show
|
| File:OOjs UI icon book-ltr.svg | <translate> This is a documentation [[<tvar name=2>Special:MyLanguage/Help:Subpages</tvar>|subpage]] for <tvar name=1>Template:Reflist</tvar>.</translate> {{#if: |<translate> It contains usage information, [[<tvar name=7>Special:MyLanguage/Help:Categories</tvar>|categories]] and other content that is not part of the original <tvar name=1>{{{text1}}}</tvar>.</translate>
|<translate> It contains usage information, [[<tvar name=7>Special:MyLanguage/Help:Categories</tvar>|categories]] and other content that is not part of the original <tvar name=1>Template</tvar> page.</translate>
}} |
}}{{#if: |
| {{#ifexist:Template:Reflist
| [[Category:{{#switch:Template
| Template | Project = Template
| Module = Module
| User = User
| #default = MediaWiki
}} documentation pages{{#translation:}}]]
| [[Category:Documentation subpages without corresponding pages{{#translation:}}]]
}}
}}
|
}}
| #default=
{{#switch:
| = {{#if:{{#ifexpr: ( {{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:reflist/doc|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}
|
{{#ifeq:show |show
|
| File:OOjs UI icon book-ltr.svg | This is a documentation subpage for Template:Reflist. {{#if: |It contains usage information, categories and other content that is not part of the original {{{text1}}}. |It contains usage information, categories and other content that is not part of the original Template page.}} |
}}{{#if: |
| {{#ifexist:Template:Reflist
| [[Category:{{#switch:Template
| Template | Project = Template
| Module = Module
| User = User
| #default = MediaWiki
}} documentation pages{{#translation:}}]]
| [[Category:Documentation subpages without corresponding pages{{#translation:}}]]
}}
}}
|
}}
| #default=
Lua error: expandTemplate: template loop detected.
}} }}
This citation template provides formatting and organizational features for footnotes. It encapsulates the {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|| {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}||
}}
}}{{#switch:s
|c|close =
|s|single
|o|open
|p|pair = <references{{#if:| {{{params}}}}}
}}{{#switch:s
|c|close =
|s|single = />
|o|open = >
|p|pair = >...
}}{{#switch:s
|s|single
|o|open =
|c|close
|p|pair = </references>
}}{{#if:{{safesubst:#switch:
|no
|n
|false
|0 =
| =
|¬ =
|yes
|y
|true
|1 = yes
|#default = yes
}}||
}} tag used by the Cite MediaWiki extension to show the list of references as defined by {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|| {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}||
}}
}}{{#switch:o
|c|close =
|s|single
|o|open
|p|pair = <ref{{#if:| {{{params}}}}}
}}{{#switch:o
|c|close =
|s|single = />
|o|open = >
|p|pair = >...
}}{{#switch:o
|s|single
|o|open =
|c|close
|p|pair = </ref>
}}{{#if:{{safesubst:#switch:
|no
|n
|false
|0 =
| =
|¬ =
|yes
|y
|true
|1 = yes
|#default = yes
}}||
}} tags. It adds support for a reduced font size, columns, groups.
If you don't use any of the additional features, then it produces the same output as the simpler and slightly faster {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|| {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}||
}}
}}{{#switch:s
|c|close =
|s|single
|o|open
|p|pair = <references{{#if:| {{{params}}}}}
}}{{#switch:s
|c|close =
|s|single = />
|o|open = >
|p|pair = >...
}}{{#switch:s
|s|single
|o|open =
|c|close
|p|pair = </references>
}}{{#if:{{safesubst:#switch:
|no
|n
|false
|0 =
| =
|¬ =
|yes
|y
|true
|1 = yes
|#default = yes
}}||
}} tag.
Parameters
- First unnamed parameter:
- column-count: a natural number specifying fixed columns into which the reference list is to be rendered. Example:
|2|. - column-width: a typographic unit of measurement such as em, specifying the width for the reference list columns. Example:
|30em|.
- column-count: a natural number specifying fixed columns into which the reference list is to be rendered. Example:
- refs: used with named references (e.g., {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|| {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}||
}}
}}{{#switch:s
|c|close =
|s|single
|o|open
|p|pair = <ref{{#if:name=name| name=name}}
}}{{#switch:s
|c|close =
|s|single = />
|o|open = >
|p|pair = >...
}}{{#switch:s
|s|single
|o|open =
|c|close
|p|pair = </ref>
}}{{#if:{{safesubst:#switch:
|no
|n
|false
|0 =
| =
|¬ =
|yes
|y
|true
|1 = yes
|#default = yes
}}||
}}); it specifies a list of some or all named references used in the article.
- group: identifies by name the subset of references to be rendered; the value should correspond to that used inline, e.g., {{[[Template:{{safesubst:#if:|{{{SISTER}}}:Template:Reflist|Reflist}}|{{safesubst:#if:|{{{SISTER}}}:Template:Reflist|Reflist}}]]|group=groupname}} renders all references with groupname as the group name ({{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|| {{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}||
}}
}}{{#switch:o
|c|close =
|s|single
|o|open
|p|pair = <ref{{#if:group=groupname| group=groupname}}
}}{{#switch:o
|c|close =
|s|single = />
|o|open = >
|p|pair = >...
}}{{#switch:o
|s|single
|o|open =
|c|close
|p|pair = </ref>
}}{{#if:{{safesubst:#switch:
|no
|n
|false
|0 =
| =
|¬ =
|yes
|y
|true
|1 = yes
|#default = yes
}}||
}}).
- liststyle: specifies the style used when the reference list is enumerated; if none is specified, the default is to render a numbered list.
Example
Lorem.<ref>ipsum</ref><ref>dolor</ref><ref>sit</ref><ref>amet</ref>
Consectetur.<ref>adipisicing</ref><ref>elit, sed</ref><ref>do</ref>
{{Reflist|3}}
gives:
Lorem.[1][2][3][4] Consectetur.[5][6][7]
| references-column-width
| references-column-count references-column-count-{{#if:1|3}} }}
| {{#if:
| references-column-width }} }}" style="{{#if: 3
| {{#iferror: {{#ifexpr: 3 > 1 }}
| column-width: 3;
| column-count: 3; }}
| {{#if:
| column-width: 30em; }} }} list-style-type: {{#switch:
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman = {{{group}}}
| #default = decimal}};">
TemplateData
{{#switch:<translate></translate> |=
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:Reflist/doc|Template:Transclude|0|1}}|not{{#ifexpr: ( {{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:reflist/doc|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|Template:Navbar}}}} {{#if:||<translate> This is the [[<tvar name=1>Special:MyLanguage/Help:TemplateData</tvar>|TemplateData]] documentation for this template used by [[<tvar name=2>Special:MyLanguage/VisualEditor</tvar>|VisualEditor]] and other tools.</translate>}}
Reflist
{{#ifeq:doc|sandbox||{{#if:{{#ifexpr: (
{{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:reflist/doc|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
{{#switch:
|=
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:Reflist/doc|Template:Transclude|0|1}}|not{{#ifexpr: ( {{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:reflist/doc|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|Template:Navbar}}}} {{#if:||This is the TemplateData documentation for this template used by VisualEditor and other tools.}}
Reflist
{{#ifeq:doc|sandbox||{{#if:{{#ifexpr: (
{{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:reflist/doc|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
Lua error: expandTemplate: template loop detected.
}} }} <templatedata> { "description": { "en": "A reference list, with options for setting columns, groups, extra references etc.", "cs": "Seznam referencí s možnostmi nastavení sloupců, skupin, dalších odkazů atd.", "pt-br": "Uma lista de referências, com opções para definir colunas, grupos, referências extras etc." }, "params": { "1": { "label": { "en": "Column Count", "cs": "Počet sloupců", "pt-br": "Quantidade de colunas" }, "type": "number", "default": "1", "description": { "en": "A natural number specifying fixed columns into which the reference list is to be rendered.", "pt-br": "Um número natural que especifica colunas fixas nas quais a lista de referência deve ser renderizada." }, "example": { "en": "|2|", "cs": "|2|", "pt-br": "|2|" } }, "colwidth": { "label": { "en": "Column Width", "cs": "Šířka sloupce", "pt-br": "Largura da coluna" }, "type": "string", "description": { "en": "A typographic unit of measurement such as “em”, specifying the width for the reference list columns.", "pt-br": "Uma unidade de medida tipográfica como “em”, especificando a largura das colunas da lista de referência." }, "example": { "en": "|colwidth=30em|", "cs": "|colwidth=30em|", "pt-br": "|colwidth=30em|" } }, "liststyle": { "label": { "en": "List Style", "cs": "Styl seznamu", "pt-br": "Estilo de lista" }, "description": { "en": "Specifies the style used when the reference list is enumerated; accepts any valid CSS value defined for “list-style-type”.", "cs": "Určuje styl použitý při výčtu seznamu odkazů; přijímá jakoukoli platnou hodnotu CSS definovanou pro “typ-style-listu”.", "pt-br": "Especifica o estilo usado quando a lista de referência é enumerada; aceita qualquer valor CSS válido definido para “list-style-type”." }, "suggestedvalues": [ "decimal", "lower-alpha", "lower-greek", "lower-roman", "upper-alpha", "upper-roman" ], "default": "decimal", "type": "string" }, "group": { "label": { "en": "Group name", "cs": "Název skupiny", "pt-br": "Nome do grupo" }, "description": { "en": "The name of the references group. Identifies by name the subset of references to be rendered; the value should correspond to that used inline.", "cs": "Název skupiny doporučení.", "pt-br": "O nome do grupo da referência. Identifica pelo nome o subconjunto de referências a serem renderizadas; o valor deve corresponder ao inline usado." }, "type": "string", "example": {
"en": "
| references-column-width
| references-column-count references-column-count-{{#if:1|{{{1}}}}} }}
| {{#if:
| references-column-width }} }}" style="{{#if:
| {{#iferror: {{#ifexpr: 1 > 1 }}
| column-width: 30em;
| column-count: 2; }}
| {{#if:
| column-width: 30em; }} }} list-style-type: {{#switch: groupname
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman = groupname
| #default = decimal}};">
renders all references with “groupname” as the group name (<ref group=“groupname”>)", "pt-br": "
| references-column-width
| references-column-count references-column-count-{{#if:1|{{{1}}}}} }}
| {{#if:
| references-column-width }} }}" style="{{#if:
| {{#iferror: {{#ifexpr: 1 > 1 }}
| column-width: 30em;
| column-count: 2; }}
| {{#if:
| column-width: 30em; }} }} list-style-type: {{#switch: groupname
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman = groupname
| #default = decimal}};">
renderiza todas as referências com “groupname” como o nome do grupo (<ref group=“groupname”>)"
} }, "refs": { "label": { "en": "List of references", "cs": "Seznam doporučení", "pt-br": "Lista de referências" }, "description": { "en": "Provides a space to define named references for use in the article. Used with named references (e.g., [1]); it specifies a list of some or all named references used in the article.", "cs": "Poskytuje prostor pro definování pojmenovaných odkazů pro použití v článku.", "pt-br": "Fornece um espaço para definir referências nomeadas para uso no artigo. Usado com referências nomeadas (por exemplo, [1]); ele especifica uma lista de algumas ou todas as referências nomeadas usadas no artigo." }, "suggested": true, "type": "content" } } } </templatedata>