Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:TemplateBox/doc: Difference between revisions

Template page
Template parameters: Mostly fix example-value description and clear up relationship between example and example-value
Prefix language interwiki links with w:
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Shared Template Warning|Template:TemplateBox|origin=Commons}}
{{Shared Template Warning|Template:TemplateBox|origin=Commons}}
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
{{#ifeq:{{SUBPAGENAME}}|sandbox||<!--
{{TemplateBox{{\sandbox}}
-->{{Lua|Module:Languages|Module:TemplateBox|Module:TNTTools}}<!--
-->{{Uses TemplateStyles|Template:TemplateBox/styles.css}}
}}{{TemplateBox{{\sandbox}}
| mbox =
| mbox =
{{Lua|Module:Languages|Module:TemplateBox{{\sandbox}}|Module:TNTTools}}
{{Lua|Module:Languages|Module:TemplateBox{{\sandbox}}|Module:TNTTools}}
Line 25: Line 22:
   | 10d-mk  = име на параметарот (<code>1</code>, <code>2</code>, …)
   | 10d-mk  = име на параметарот (<code>1</code>, <code>2</code>, …)
   | 10d-pt  = Nome do parâmetro (o mesmo para <code>2</code>, <code>3</code>, …). Note que se todos os parâmetros que começam por um número forem removidos da predefinição, as notas de utilização dirão «A predefinição não aceita parâmetros».
   | 10d-pt  = Nome do parâmetro (o mesmo para <code>2</code>, <code>3</code>, …). Note que se todos os parâmetros que começam por um número forem removidos da predefinição, as notas de utilização dirão «A predefinição não aceita parâmetros».
  | 10d-zh-hant = 模板文檔的第<var>x</var>的參數(<code>1</code>表示第一個參數、<code>2</code>表示第二個,以此類推)
   <!-- For Templatedata -->
   <!-- For Templatedata -->
   | 10d-td-en  = Name of the documented template's parameter #x (1 names the first parameter, 2 the second, etc)
   | 10d-td-en  = Name of the documented template's parameter #x (1 names the first parameter, 2 the second, etc)
Line 38: Line 36:
   | 10d-td-mk  = име на параметарот (1, 2, …)
   | 10d-td-mk  = име на параметарот (1, 2, …)
   | 10d-td-pt  = Nome do parâmetro (o mesmo para 2, 3, …). Note que se todos os parâmetros que começam por um número forem removidos da predefinição, as notas de utilização dirão «A predefinição não aceita parâmetros».
   | 10d-td-pt  = Nome do parâmetro (o mesmo para 2, 3, …). Note que se todos os parâmetros que começam por um número forem removidos da predefinição, as notas de utilização dirão «A predefinição não aceita parâmetros».
    
   | 10d-td-zh-hant = 模板文檔的第x個參數(1表示第一個參數、2表示第二個,以此類推)


   | 10label-en  = name (param)
   | 10label-en  = name (param)
Line 49: Line 47:
   | 10label-ko  = 이름 (매개변수)
   | 10label-ko  = 이름 (매개변수)
   | 10label-pt  = nome (parâmetro)
   | 10label-pt  = nome (parâmetro)
  | 10label-zh-hant = 名稱(參數)


   |10type = string
   |10type = string
Line 66: Line 65:
   | 20d-mk  = опис на параметарот (<code>1d</code>, <code>2d</code>, …) {{TemplateBox/use suffix}}
   | 20d-mk  = опис на параметарот (<code>1d</code>, <code>2d</code>, …) {{TemplateBox/use suffix}}
   | 20d-pt  = Descrição do parâmetro (o mesmo para <code>2d</code>, <code>3d</code>, …). {{TemplateBox/use suffix}}
   | 20d-pt  = Descrição do parâmetro (o mesmo para <code>2d</code>, <code>3d</code>, …). {{TemplateBox/use suffix}}
  | 20d-zh-hant = 參數<var>x</var>的說明(<code>1d</code>代表第一個參數的說明、<code>2d</code>代表第二個,以此類推){{TemplateBox/use suffix}}
   <!-- For Templatedata -->
   <!-- For Templatedata -->
   | 20d-td-en  = Description of parameter x (1d describes the documented template's first parameter, 2d the second, etc)  
   | 20d-td-en  = Description of parameter x (1d describes the documented template's first parameter, 2d the second, etc)
   | 20d-td-et  = parameetri kirjeldus (nagu ka 2d, 3d, jne.)
   | 20d-td-et  = parameetri kirjeldus (nagu ka 2d, 3d, jne.)
   | 20d-td-hu  = A paraméter leírása (hasonlóan 2d, 3d, …)
   | 20d-td-hu  = A paraméter leírása (hasonlóan 2d, 3d, …)
Line 73: Line 73:
   | 20d-td-ko  = 매개변수의 설명 (2d, 3d, … 도 마찬가지)
   | 20d-td-ko  = 매개변수의 설명 (2d, 3d, … 도 마찬가지)
   | 20d-td-pt  = Descrição do parâmetro (o mesmo para 2d, 3d, …).
   | 20d-td-pt  = Descrição do parâmetro (o mesmo para 2d, 3d, …).
  | 20d-td-zh-hant= 參數x的說明(1d代表第一個參數的說明、2d代表第二個,以此類推)


   | 20label-en  = description (param)
   | 20label-en  = description (param)
Line 83: Line 84:
   | 20label-ko  = 설명 (매개변수)
   | 20label-ko  = 설명 (매개변수)
   | 20label-pt  = descrição (parâmetro)
   | 20label-pt  = descrição (parâmetro)
  | 20label-zh-hant = 說明(參數)


   |20aliases = xd-en/xdescription/xdescription-en
   |20aliases = xd-en/xdescription/xdescription-en
Line 96: Line 98:
   | 30d-hu  = A paraméter leírása (hasonlóan <code>2d-td</code>, <code>3d-td</code>, …) a [[mw:Extension:TemplateData|TemplateData]] MediaWiki-kiterjesztés számára. Ha nincs megadva, az <code>1d</code> paraméter helyettesíti. Mindig felül lehet írni az alapértelmezett értéket a paraméternévhez fűzött <code>-td</code> utótaggal. A nyelvkóddal a nyelvet is meg lehet határozni. Pl. <code>3d-td-hu</code>lesz a <code>3</code>. paraméter TemplateData-ban használt magyar fordítása. {{TemplateBox/use suffix}}
   | 30d-hu  = A paraméter leírása (hasonlóan <code>2d-td</code>, <code>3d-td</code>, …) a [[mw:Extension:TemplateData|TemplateData]] MediaWiki-kiterjesztés számára. Ha nincs megadva, az <code>1d</code> paraméter helyettesíti. Mindig felül lehet írni az alapértelmezett értéket a paraméternévhez fűzött <code>-td</code> utótaggal. A nyelvkóddal a nyelvet is meg lehet határozni. Pl. <code>3d-td-hu</code>lesz a <code>3</code>. paraméter TemplateData-ban használt magyar fordítása. {{TemplateBox/use suffix}}
   | 30d-pt  = Descrição do parâmetro (o mesmo para <code>2d-td</code>, <code>3d-td</code>, …) para a extensão [[mw:Extension:TemplateData|Extension:TemplateData]], que não aceita texto wiki. Se este parâmetro for omitido, será usado o <code>1d</code>. Pode sempre substituir os valores por omissão, especificamente para a extensão TemplateData, acrescentando <code>-td</code> ao nome do parâmetro. Pode especificar uma língua acrescentando o seu código de língua. Por exemplo, <code>3d-td-pt</code> seria a tradução para português da descrição do parâmetro <code>3</code> que será usada em TemplateData. {{TemplateBox/use suffix}}
   | 30d-pt  = Descrição do parâmetro (o mesmo para <code>2d-td</code>, <code>3d-td</code>, …) para a extensão [[mw:Extension:TemplateData|Extension:TemplateData]], que não aceita texto wiki. Se este parâmetro for omitido, será usado o <code>1d</code>. Pode sempre substituir os valores por omissão, especificamente para a extensão TemplateData, acrescentando <code>-td</code> ao nome do parâmetro. Pode especificar uma língua acrescentando o seu código de língua. Por exemplo, <code>3d-td-pt</code> seria a tradução para português da descrição do parâmetro <code>3</code> que será usada em TemplateData. {{TemplateBox/use suffix}}
  | 30d-zh-hant = 供[[mw:Extension:TemplateData|Extension:TemplateData]]使用的參數<var>x</var>說明(此處不接受Wiki語法)。若省略此參數,則會預設使用<var>x</var>d。您可以在參數名稱後方加上<code>-td</code>為TemplateData覆寫預設值。你也可以再附加語言代碼來指定特定語言,例如:<code>3d-td-zh-hant</code>即代表用於TemplateData中參數<code>3</code>的繁體中文說明。{{TemplateBox/use suffix}}。(<code>1d-td</code>用於說明模板的第一個參數,<code>2d-td</code>代表第二個,以此類推)


   <!-- For Templatedata -->
   <!-- For Templatedata -->
Line 104: Line 107:
   | 30d-td-hu = A paraméter leírása (hasonlóan 2d-td, 3d-td, …) a TemplateDate MediaWiki-kiterjesztés számára, ahol nincs wiki-jelölőnyelv. Ha nincs megadva, az 1d paraméter helyettesíti. Mindig felül lehet írni az alapértelmezett értéket a paraméternévhez fűzött <code>-td</code> utótaggal. A nyelvkóddal a nyelvet is meg lehet határozni. Pl. <code>3d-td-hu</code>lesz a 3. paraméter TemplateData-ban használt magyar fordítása.
   | 30d-td-hu = A paraméter leírása (hasonlóan 2d-td, 3d-td, …) a TemplateDate MediaWiki-kiterjesztés számára, ahol nincs wiki-jelölőnyelv. Ha nincs megadva, az 1d paraméter helyettesíti. Mindig felül lehet írni az alapértelmezett értéket a paraméternévhez fűzött <code>-td</code> utótaggal. A nyelvkóddal a nyelvet is meg lehet határozni. Pl. <code>3d-td-hu</code>lesz a 3. paraméter TemplateData-ban használt magyar fordítása.
   | 30d-td-pt = Descrição do parâmetro (o mesmo para 2d-td, 3d-td, …) para a extensão TemplateData, que não aceita texto wiki. Se este parâmetro for omitido, será usado o 1d. Pode sempre substituir os valores por omissão, especificamente para a extensão TemplateData, acrescentando «-td» ao nome do parâmetro. Pode especificar uma língua acrescentando o seu código de língua. Por exemplo, «3d-td-en» seria a tradução para português da descrição do parâmetro 3 que será usada em TemplateData.
   | 30d-td-pt = Descrição do parâmetro (o mesmo para 2d-td, 3d-td, …) para a extensão TemplateData, que não aceita texto wiki. Se este parâmetro for omitido, será usado o 1d. Pode sempre substituir os valores por omissão, especificamente para a extensão TemplateData, acrescentando «-td» ao nome do parâmetro. Pode especificar uma língua acrescentando o seu código de língua. Por exemplo, «3d-td-en» seria a tradução para português da descrição do parâmetro 3 que será usada em TemplateData.
 
 
   | 30label-en  = TemplateData description (param)
   | 30label-en  = TemplateData description (param)
   | 30label-be-tarask = апісаньне TemplateData (парамэтар)
   | 30label-be-tarask = апісаньне TemplateData (парамэтар)
Line 126: Line 129:
   | 40d-hu  = Egy (nagyon) rövid név a paraméternek. Próbáld meg 20 karakter alatt tartani. <code>1label-hu</code> lesz a magyar fordítása. {{TemplateBox/use suffix}}
   | 40d-hu  = Egy (nagyon) rövid név a paraméternek. Próbáld meg 20 karakter alatt tartani. <code>1label-hu</code> lesz a magyar fordítása. {{TemplateBox/use suffix}}
   | 40d-it  = Etichetta (molto) sintetica per il parametro. Prova a stare sotto i 20 caratteri. <code>1label-it</code> sarà la traduzione italiana. {{TemplateBox/use suffix}}
   | 40d-it  = Etichetta (molto) sintetica per il parametro. Prova a stare sotto i 20 caratteri. <code>1label-it</code> sarà la traduzione italiana. {{TemplateBox/use suffix}}
   | 40d-pt  = Um nome (muito) curto para o parâmetro. Tente usar menos de 20 caracteres. <code>1label-pt</code> seria a tradução para português desta etiqueta. {{TemplateBox/use suffix}}
   | 40d-pt  = Um nome (muito) curto para o parâmetro. Tente usar menos de 20 caracteres. <code>1label-pt</code> seria a tradução para português desta etiqueta. {{TemplateBox/use suffix}}
   <!-- For Templatedata -->
   <!-- For Templatedata -->
   | 40d-td-en  = A (very) brief name for parameter x. Try to keep under 20-ish characters. For example, 1label-de would be the German label of the documented template's first parameter.
   | 40d-td-en  = A (very) brief name for parameter x. Try to keep under 20-ish characters. For example, 1label-de would be the German label of the documented template's first parameter.
Line 188: Line 191:




|70 = 1set
|70 = <var>x</var>set
   | 70d-en  = Label and ID of a set in one.{{Clarify|date=October 2024}} Multiple parameters can be grouped in a set, if either none or all of them must be supplied. Try to keep under 20-ish characters. <small>''(→ see also on mediawiki: [[mw:Extension:TemplateData#TemplateData object|overview]])''</small>
   | 70d-en  = Label and ID of a set in one.{{Clarify|date=October 2024}} Multiple parameters can be grouped in a set, if either none or all of them must be supplied. Try to keep under 20-ish characters. <small>''(→ see also on mediawiki: [[mw:Extension:TemplateData#TemplateData object|overview]])''</small>
   | 70d-de  = Label und gleichzeitig eine ID. Mehrere Parameter können in einem Set gruppiert werden; wenn entweder keiner dieser Parameter oder alle angegeben werden müssen. Unter 20 Zeichen.
   | 70d-de  = Label und gleichzeitig eine ID. Mehrere Parameter können in einem Set gruppiert werden; wenn entweder keiner dieser Parameter oder alle angegeben werden müssen. Unter 20 Zeichen.
Line 223: Line 226:
   | 80d-td-et  = parameetri (nagu ka "2def", "3def", jne.) vaikeväärtus
   | 80d-td-et  = parameetri (nagu ka "2def", "3def", jne.) vaikeväärtus
   | 80d-td-hu  = alapértelmezett érték a paraméternek (hasonlóan "2def", "3def", …)
   | 80d-td-hu  = alapértelmezett érték a paraméternek (hasonlóan "2def", "3def", …)
   | 80d-td-it  = Valore di default per il parametro ("1def", "2def", "3def", …)  
   | 80d-td-it  = Valore di default per il parametro ("1def", "2def", "3def", …)
   | 80d-td-ja  = パラメーターの既定値 (2def、3def、… も同様)
   | 80d-td-ja  = パラメーターの既定値 (2def、3def、… も同様)
   | 80d-td-ko  = 매개변수의 기본값 (2def, 3def, … 도 마찬가지)
   | 80d-td-ko  = 매개변수의 기본값 (2def, 3def, … 도 마찬가지)
Line 237: Line 240:
   | 80label-pt  = valor por omissão (parâmetro)
   | 80label-pt  = valor por omissão (parâmetro)


   | 80aliases  = xdef-td/xdefault
   | 80aliases  = xdef-td/xdefault
 
 


|85 = <var>x</var>av
|85 = <var>x</var>av
Line 244: Line 247:
   | 85d-de    = Automatisch erzeugter Standardwert im Wikitext-Format, z.B. so etwas wie das aktuelle Datum oder der Name des Bearbeiters. Das passiert meisten mittels automatische Ersetzungen (engl.: substitutions) "subst", z.B. das aktuelle Jahr mittels 2024.
   | 85d-de    = Automatisch erzeugter Standardwert im Wikitext-Format, z.B. so etwas wie das aktuelle Datum oder der Name des Bearbeiters. Das passiert meisten mittels automatische Ersetzungen (engl.: substitutions) "subst", z.B. das aktuelle Jahr mittels 2024.
   <!-- For Templatedata -->
   <!-- For Templatedata -->
   | 85d-td-en = Dynamically-generated default value in wikitext, such as today's date or the editing user's name; this will often involve wikitext substitution, such as "subst:CURRENTYEAR".  
   | 85d-td-en = Dynamically-generated default value in wikitext, such as today's date or the editing user's name; this will often involve wikitext substitution, such as "subst:CURRENTYEAR".
   | 85d-td-de = Automatisch erzeugter Standardwert im Wikitext-Format, z.B. so etwas wie das aktuelle Datum oder der Name des Bearbeiters. Das passiert meisten mittels automatische Ersetzungen (engl.: substitutions) "subst", z.B. das aktuelle Jahr mittels "2024".
   | 85d-td-de = Automatisch erzeugter Standardwert im Wikitext-Format, z.B. so etwas wie das aktuelle Datum oder der Name des Bearbeiters. Das passiert meisten mittels automatische Ersetzungen (engl.: substitutions) "subst", z.B. das aktuelle Jahr mittels "2024".
   | 85label-en = autovalue (param)
   | 85label-en = autovalue (param)
Line 263: Line 266:
   | 90def      = not specified
   | 90def      = not specified
   | 90stat    = optional
   | 90stat    = optional
 
 


|100 = <var>x</var>stat
|100 = <var>x</var>stat
Line 425: Line 428:
   |130type = string
   |130type = string
   |130stat = required
   |130stat = required
|135 = shorthand
  | 135d-en  = Aliases to ease invocation, separated by commas. Each alias must have a page which redirects to the template page. For example, if {{Tl|Catseealso}} and {{Tl|Csa}} are aliases for {{Tl|Cat see also}}, [[Template:Catseealso]] and [[Template:Csa]] are redirects to [[Template:Cat see also]]. {{Mbox
|text = Despite this parameter's name, an alias's length can be equal to or higher than the canonical name's (for example, {{Tl|Semicolon}} is an alias of {{Tl|;}}).
|type = query
|image = [[File:Warning.svg|alt=Exclamation mark|30px]]
}}
<p>Aliases are listed on the documented template's page, in the ''Usage'' section (like [[#Usage|the one on this page]]), directly under the synopsis (and above the ''Usage notes'' if there are some). See examples of lists of redirects [[Template:CatDiffuse/doc|here]] and with an additional searches-for-more-redirects [[Template:Cat see also/doc|here]].</p>
  | 135d-bar = Kuarzschraibwaise fyr de aifache Nutzung (Umlaitunga auf de Hauptvurlog)
  | 135d-de  = Kurzschreibweise(n) für einfachere Nutzung (Umleitungen auf die Hauptvorlage), getrennt durch Komma, z.&nbsp;B. '''<nowiki>{{tl|catseealso}}, {{tl|csa}}</nowiki>''' für [[Template:Cat see also]]. Auf den Doc-Seiten werden diese Shorthands im Abschnitt [[#Verwendung|Verwendung]] direkt unterhalb der Kopiervorlage (und oberhalb der <code>usage-notes</code>, wenn angegeben) aufgeführt. Beispiele für Shorthand-Listen [[Template:CatDiffuse/doc|hier]] und mit einem zusätzlichen Suche-nach-mehr-Shorthands-Link [[Template:Cat see also/doc|hier]].
  | 135d-et  = lühendus lihtsaks kasutamiseks (suunab ümber põhimallile)
  | 135d-fr  = Des alias pour une utilisation simplifiée, séparés par des virgules. Chaque alias doit avoir une page qui redirige vers la page du modèle. Par exemple, si {{Tl|Catseealso}} et {{Tl|Csa}} sont des alias de {{Tl|Cat see also}}, [[Template:Catseealso]] et [[Template:Csa]] sont des redirections vers [[Template:Cat see also]].
  | 135d-hu  = rövidítés a könnyebb használatért (átirányít a fősablonra)
  | 135d-it  = abbreviazione per un facile utilizzo (reindirizza al template principale). Vedi gli esempi [[Template:CatDiffuse/doc|qui]] e [[Template:Cat see also/doc|qui]] di liste di redirect, e cercane altri.
  | 135d-mk  = кратенка за лесна примена (пренасочува кон главниот шаблон)
  | 135d-pt  = Atalho para acesso rápido (redirecciona para a predefinição principal). Ver [[Template:CatDiffuse/doc|aqui]] e [[Template:Cat see also/doc|aqui]] exemplos de listas de redirecionamentos.
  | 135label-en  = aliases
  | 135label-de  = Abk.
  | 135label-et  = lühend
  | 135label-hu  = rövidítés
  | 135label-it  = abbreviazione
  | 135label-pt  = atalho
  |135type = string
|137 = usage-notes
  | 137d-en = Notes about usage of the template which will be displayed in the ''Usage'' section (like [[#Usage|the one in this page]]) under the invocation template (and any aliases)
  | 137d-bar= Bemerkunga ywa de richtige Vawendung vo dera Vurlog
  | 137d-de = Bemerkungen über die korrekte Verwendung der Vorlage; werden unterhalb der Kopiervorlage im Abschnitt [[#Verwendung|Verwendung]] dargestellt (bzw. direkt unterhalb den Shorthands wenn diese angegeben sind)
  | 137d-et = märkused malli korrektseks kasutamiseks
  | 137d-fr = Notes sur l’utilisation du modèle qui seront affichées dans la section ''Utilisation'' (comme [[#Utilisation|celle de cette page]]) sous le gabarit d'invocation
  | 137d-hu = Jegyzetek a sablon helyes használatához
  | 137d-it = Note per il corretto utilizzo del template
  | 137d-mk = белешки за правилна употреба на шаблонот
  | 137d-pt = Notas sobre o uso correcto da predefinição.
  | 137label-en  = usage notes
  | 137label-de  = Benutzungshinweise
  | 137label-et  = kasutusjuhised
  | 137label-hu  = használati jegyzetek
  | 137label-it  = note d'uso
  | 137label-pt  = notas de utilização
  |137type = string




Line 597: Line 648:


   |160sv = top/bottom/license/source
   |160sv = top/bottom/license/source
|170 = usage-notes
  | 170d-en = Notes about the correct usage of the template; will be listed in the [[#Usage|Usage]]-section under the code example and the shorthands, if given.
  | 170d-bar= Bemerkunga ywa de richtige Vawendung vo dera Vurlog
  | 170d-de = Bemerkungen über die korrekte Verwendung der Vorlage; werden unterhalb der Kopiervorlage im Abschnitt [[#Verwendung|Verwendung]] dargestellt (bzw. direkt unterhalb den Shorthands wenn diese angegeben sind)
  | 170d-et = märkused malli korrektseks kasutamiseks
  | 170d-fr = Remarques sur l’utilisation du modèle (placé sous l'exemple de code dans la section [[#Utilisation|Utilisation]])
  | 170d-hu = Jegyzetek a sablon helyes használatához
  | 170d-it = Note per il corretto utilizzo del template
  | 170d-mk = белешки за правилна употреба на шаблонот
  | 170d-pt = Notas sobre o uso correcto da predefinição.
  | 170label-en  = usage-notes
  | 170label-de  = Benutzungshinweise
  | 170label-et  = kasutusjuhised
  | 170label-hu  = használati jegyzetek
  | 170label-it  = note d'uso
  | 170label-pt  = notas de utilização
  |170type = string




Line 656: Line 686:
   | 190d-de    = Beispiel
   | 190d-de    = Beispiel
   | 190d-et    = Kasutusnäide (töötab vaid üheainsa nimetamata parameetriga). On olemas ka <code>example2</code> teise näite jaoks.
   | 190d-et    = Kasutusnäide (töötab vaid üheainsa nimetamata parameetriga). On olemas ka <code>example2</code> teise näite jaoks.
   | 190d-fr    = Exemple d’utilisation du modèle
   | 190d-fr    = Exemple d’utilisation du modèle (ensemble de valeurs de paramètres)
   | 190d-hu    = Példa (csak egy, névtelen paraméterrel működik)
   | 190d-hu    = Példa (csak egy, névtelen paraméterrel működik)
   | 190d-it    = Esempio d'uso. È possibile specificare <code>example2</code> per un secondo esempio.
   | 190d-it    = Esempio d'uso. È possibile specificare <code>example2</code> per un secondo esempio.
Line 662: Line 692:
   | 190d-pt    = Uso exemplificativo. Também existe o <code>example2</code> para um segundo exemplo.
   | 190d-pt    = Uso exemplificativo. Também existe o <code>example2</code> para um segundo exemplo.


   | 190label-en  = example
   | 190label-en  = example call parameters
   | 190label-de  = Beispiel
   | 190label-de  = Beispiel
   | 190label-et  = näide
   | 190label-et  = näide
Line 673: Line 703:


|200 = example-value
|200 = example-value
   | 200d-en  = Result of the invocation of the template with the values set in the <code>example</code> parameter. This parameter's value is almost always set by invoking the documented template with the values defined in <code>example</code>. In the example above, the value of <code>example-value</code> would be defined using <code><nowiki>{{Cat see also|lakes}}</nowiki></code>; with two parameters it will be '''<nowiki>{{Cat see also|lakes|for=for more information}}</nowiki>'''. The documented template's page will show the result in a box separated from the example code by a "renders as:" line. If you keep <code>example-value</code> parameter empty, it will render <nowiki>{{catseealso|lakes}}</nowiki> by default.<br>There is also <code>example2-value</code> for a second example.
   | 200d-en  = Result of the invocation of the template with the values set in the <code>example</code> parameter. This parameter's value is almost always set by invoking the documented template with the values defined in <code>example</code>. In the example above, the value of <code>example-value</code> would be defined using {{Tle|T=Cat see also|lakes}}; with two parameters it will be '''<nowiki>{{Cat see also|lakes|for=for more information}}</nowiki>'''. The documented template's page will show the result in a box separated from the example code by a "renders as:" line. See {{Tl|Own using}} for an example of a template which uses this parameter.<br>There is also <code>example2-value</code> for a second example.
{{Mbox
{{Mbox
  |text = If <code>example</code> is set, and not just a single parameter value, setting this parameter is currently needed (as {{Tlf|TemplateBox}} does not call itself properly).<br>If <code>example</code> is not set, this parameter is ignored.
  |text = If <code>example</code> is set, and not just a single parameter value, it is currently required to set this parameter (as {{Tlf|TemplateBox}} does not call itself properly). Not doing so causes unspecified behavior.<br>If <code>example</code> is not set, this parameter is ignored.
  |type = query
  |type = query
  |image = [[File:Warning.svg|alt=Exclamation mark|30px]]
  |image = [[File:Warning.svg|alt=Exclamation mark|30px]]
Line 684: Line 714:
   | 200d-pt  = Se quiser mostrar mais de um parâmetro ou houver parâmetros com nome, use: {{TemplateBox/doc/example-value}}
   | 200d-pt  = Se quiser mostrar mais de um parâmetro ou houver parâmetros com nome, use: {{TemplateBox/doc/example-value}}


   | 200label-en  = example-result
   | 200label-en  = example call result
   | 200label-de  = Beispiel-Ergebnis
   | 200label-de  = Beispiel-Ergebnis
   | 200label-et  = näite tulemus
   | 200label-et  = näite tulemus
Line 692: Line 722:


   |200type = string
   |200type = string
   |200def = <nowiki>{{TEMPLATENAME|<example>}}</nowiki>
   |200def = <nowiki>{{TEMPLATENAME|<example>}}</nowiki>




|210 = i18n-method
|210 = i18n-method
   |210d = {{LangSwitch
   |210d = {{LangSwitch
     |en=method the localization is achieved by. Known values
     |en=method the localization is achieved by. See [[Commons:Template i18n]] for more details. Known values
     |bar=Wie wead de Vurlog in a åndre Sråach ywasetzt — Möglich san folgende Werte
     |bar=Wie wead de Vurlog in a åndre Sråach ywasetzt — Möglich san folgende Werte
     |de=Die zur Übersetzung in eine lokale Sprache verwendete Methode — Mögliche Werte
     |de=Die zur Übersetzung in eine lokale Sprache verwendete Methode — Mögliche Werte
     |et=meetod, millega lokaliseerimist teostatakse. Teadaolevad väärtused
     |et=meetod, millega lokaliseerimist teostatakse. Teadaolevad väärtused
     |fr=Méthode utilisée pour l’internationalisation. Valeurs possibles
     |fr=Méthode utilisée pour l’internationalisation. Valeurs possibles 
     |hu=Fordítási rendszer; lehetséges értékek
     |hu=Fordítási rendszer; lehetséges értékek
     |it=Metodo di localizzazione utilizzato. Valori predefiniti
     |it=Metodo di localizzazione utilizzato. Valori predefiniti
Line 769: Line 799:
     |pt=Usa {{tl|autotranslate}} ou aplica um método semelhante numa subpágina que está marcada para tradução usando a extensão de tradução.
     |pt=Usa {{tl|autotranslate}} ou aplica um método semelhante numa subpágina que está marcada para tradução usando a extensão de tradução.
     }}
     }}
; TNT : {{LangSwitch
; tnt : {{LangSwitch
| en  = Using [[Module:TNT]] and a tabular translations file on Wikimedia Commons.
| en  = Using [[Module:TNT]] and a tabular translations file on Wikimedia Commons.
}}
}}
; wikidata : {{LangSwitch
    |en= Historically used [[:w:Wikidata|Wikidata]] as a source of translations, via the now-deprecated <nowiki>{{label}}</nowiki> template. It has been superseded by template-local hardcoded names; access from Lua can be done through [[Module:Wikidata label]] or [[Module:Core]] (<code>getLabel</code> function).
    }}
<nowiki/>
<nowiki/>


Line 849: Line 882:


| 245 = i18n-data-file
| 245 = i18n-data-file
   | 245d-en  = The tabular data file on Wikimedia Commons in the Data namespace. The '''I18n/''' prefix and the '''.tab''' file extension are added automatically if its missing.
   | 245d-en  = The tabular data file on Wikimedia Commons in the Data namespace. The '''I18n/''' prefix and the '''.tab''' file extension are added automatically if its missing.
   <!-- For Templatedata -->
   <!-- For Templatedata -->
   | 245d-td-en  = The tabular data file on Wikimedia Commons in the Data namespace. The “I18n/” prefix and the “.tab” file extension is added automatically if its missing.
   | 245d-td-en  = The tabular data file on Wikimedia Commons in the Data namespace. The “I18n/” prefix and the “.tab” file extension is added automatically if its missing.
Line 910: Line 943:
<pre> |1def =
<pre> |1def =
  |1stat =
  |1stat =
  |useTemplateData =  
  |useTemplateData =
</pre>
</pre>
* '''infobox''' - multiple lines, the equals signs are aligned with each other:
* '''infobox''' - multiple lines, the equals signs are aligned with each other:
Line 923: Line 956:
<pre> |1def =
<pre> |1def =
  |1stat =
  |1stat =
  |useTemplateData =  
  |useTemplateData =
</pre>
</pre>
* '''infobox''' - Parameter sind in Zeilen untereinander angeordnet und die "="-Zeichen sind untereinander ausgerichtet:
* '''infobox''' - Parameter sind in Zeilen untereinander angeordnet und die "="-Zeichen sind untereinander ausgerichtet:
Line 929: Line 962:
  |1stat          =
  |1stat          =
  |useTemplateData = </pre>
  |useTemplateData = </pre>
 
   | 270d-bar= Noamalawais hergnommane Anordung vo de Parametar — Möglich san folgende Werte '''one''' - Parameter san in oana Zailn hintaainanda ågordnet; '''multi''' - Parametar san in Zailm untarananda ågordnet; '''infobox''' - multiple lines and space padding in front of the "=".
   | 270d-bar= Noamalawais hergnommane Anordung vo de Parametar — Möglich san folgende Werte '''one''' - Parameter san in oana Zailn hintaainanda ågordnet; '''multi''' - Parametar san in Zailm untarananda ågordnet; '''infobox''' - multiple lines and space padding in front of the "=".
   | 270d-et = Viis kuidas parameetrid on tüüpiliselt asetatud. Võimalikud väärtused: '''one''' — üks rida; '''multi''' — parameetrid asetatud mitmesse ritta; '''infobox''' — mitu rida ja tühikutega polsterdamine võrdusmärgi "=" ees.
   | 270d-et = Viis kuidas parameetrid on tüüpiliselt asetatud. Võimalikud väärtused: '''one''' — üks rida; '''multi''' — parameetrid asetatud mitmesse ritta; '''infobox''' — mitu rida ja tühikutega polsterdamine võrdusmärgi "=" ees.
Line 966: Line 999:
   | 280d-it= Utilizzare il parametro <code>print</code>.
   | 280d-it= Utilizzare il parametro <code>print</code>.
   | 280d-pt= Não utilizar; use o parâmetro <code>print</code>.
   | 280d-pt= Não utilizar; use o parâmetro <code>print</code>.
<!--  
<!--
|280aliases = print    ← It is probably not correct when an alias for this deprecated parameter "lines" is the same as the name of an exiting parameter [[user:W like wiki]]
|280aliases = print    ← It is probably not correct when an alias for this deprecated parameter "lines" is the same as the name of an exiting parameter [[user:W like wiki]]
-->
-->
   |280stat = deprecated<!-- set to deprecated as soon as https://bugzilla.wikimedia.org/show_bug.cgi?id=52676 is fixed << Closed, Declined -->
   |280stat = deprecated<!-- set to deprecated as soon as https://bugzilla.wikimedia.org/show_bug.cgi?id=52676 is fixed << Closed, Declined -->
|290 = shorthand
  | 290d-en  = Aliases to ease invocation, separated by commas. Each alias must have a page which redirects to the template page. For example, if {{Tl|Catseealso}} and {{Tl|Csa}} are aliases for {{Tl|Cat see also}}, [[Template:Catseealso]] and [[Template:Csa]] are redirects to [[Template:Cat see also]]. {{Mbox
|text = Despite this parameter's name, an alias's length can be equal to or higher than the canonical name's (for example, {{Tl|Semicolon}} is an alias of {{Tl|;}}).
|type = query
|image = [[File:Warning.svg|alt=Exclamation mark|30px]]
}}
<p>Aliases are listed on the documented template's page, in the ''Usage'' section (like [[#Usage|this one]]), directly under the synopsis (and above the ''Usage notes'' if there are some). See examples of lists of redirects [[Template:CatDiffuse/doc|here]] and with an additional searches-for-more-redirects [[Template:Cat see also/doc|here]].</p>
  | 290d-bar = Kuarzschraibwaise fyr de aifache Nutzung (Umlaitunga auf de Hauptvurlog)
  | 290d-de  = Kurzschreibweise(n) für einfachere Nutzung (Umleitungen auf die Hauptvorlage), getrennt durch Komma, z.&nbsp;B. '''<nowiki>{{tl|catseealso}}, {{tl|csa}}</nowiki>''' für [[Template:Cat see also]]. Auf den Doc-Seiten werden diese Shorthands im Abschnitt [[#Verwendung|Verwendung]] direkt unterhalb der Kopiervorlage (und oberhalb der <code>usage-notes</code>, wenn angegeben) aufgeführt. Beispiele für Shorthand-Listen [[Template:CatDiffuse/doc|hier]] und mit einem zusätzlichen Suche-nach-mehr-Shorthands-Link [[Template:Cat see also/doc|hier]].
  | 290d-et  = lühendus lihtsaks kasutamiseks (suunab ümber põhimallile)
  | 290d-fr  = Des alias pour une utilisation simplifiée, séparés par des virgules. Chaque alias doit avoir une page qui redirige vers la page du modèle. Par exemple, si {{Tl|Catseealso}} et {{Tl|Csa}} sont des alias de {{Tl|Cat see also}}, [[Template:Catseealso]] et [[Template:Csa]] sont des redirections vers [[Template:Cat see also]].
  | 290d-hu  = rövidítés a könnyebb használatért (átirányít a fősablonra)
  | 290d-it  = abbreviazione per un facile utilizzo (reindirizza al template principale). Vedi gli esempi [[Template:CatDiffuse/doc|qui]] e [[Template:Cat see also/doc|qui]] di liste di redirect, e cercane altri.
  | 290d-mk  = кратенка за лесна примена (пренасочува кон главниот шаблон)
  | 290d-pt  = Atalho para acesso rápido (redirecciona para a predefinição principal). Ver [[Template:CatDiffuse/doc|aqui]] e [[Template:Cat see also/doc|aqui]] exemplos de listas de redirecionamentos.
  | 290label-en  = aliases
  | 290label-de  = Abk.
  | 290label-et  = lühend
  | 290label-hu  = rövidítés
  | 290label-it  = abbreviazione
  | 290label-pt  = atalho
  |290type = string




Line 1,039: Line 1,045:


|320 = docsub-page
|320 = docsub-page
   | 320d-en = <code>page</code> parameter from {{tld|nowrap=1|Documentation subpage}}  
   | 320d-en = <code>page</code> parameter from {{tld|nowrap=1|Documentation subpage}}
   <!-- For Templatedata -->
   <!-- For Templatedata -->
   | 320d-td-en = “page” parameter from <nowiki>{{Documentation subpage}}</nowiki>  
   | 320d-td-en = “page” parameter from <nowiki>{{Documentation subpage}}</nowiki>
 
 
   | 320label-en = docsub-page
   | 320label-en = docsub-page


Line 1,135: Line 1,141:
   |1set      = <!-- 1st parameter: set ID / Label (to group multiple parameters in a set) -->
   |1set      = <!-- 1st parameter: set ID / Label (to group multiple parameters in a set) -->
   |1def      = <!-- 1st parameter: fixed default value (+LANGUAGE CODE) -->
   |1def      = <!-- 1st parameter: fixed default value (+LANGUAGE CODE) -->
   |1av      = <!-- 1st parameter: autovalue, dynamically-generated default value, e.g. current year -->
   |1av      = <!-- 1st parameter: autovalue, dynamically-generated default value, e.g. current year -->
   |1sv      = <!-- 1st parameter: suggested values to help users select the desired value, separated by "/" -->
   |1sv      = <!-- 1st parameter: suggested values to help users select the desired value, separated by "/" -->
   |1stat    = <!-- 1st parameter: status (values: required, optional, optional- or deprecated) -->
   |1stat    = <!-- 1st parameter: status (values: required, optional, optional- or deprecated) -->
  <!-- TEMPLATE SECTION -->
  <!-- TEMPLATE SECTION -->

Latest revision as of 09:20, 12 August 2026

This template ({{TemplateBox}}) eases documentation of (other) templates. Using it helps uniformizing template documentation pages. See: Commons:Template documentation and Commons:TemplateData.

Usage

{{TemplateBox
 |x        =
 |xd       =
 |xlabel   =
 |xaliases =
 |xtype    =
 |xset     =
 |xdef     =
 |xav      =
 |xsv      =
 |xstat    =
 |useTemplateData     =
 |name                =
 |desc                =
 |shorthand           =
 |usage-notes         =
 |namespace           =
 |usergroup           =
 |placement           =
 |type                =
 |example             =
 |example-value       =
 |i18n-method         =
 |i18n-desc           =
 |i18n-mediawiki-msg  =
 |i18n-subpage        =
 |i18n-data-file      =
 |seealso             =
 |setscats            =
 |print               =
 |relieson            =
 |mustbesubst         =
 |docsub-page         =
}}

Usage notes: For a code template (for copy-pasting) with short parameter descriptions, see section Template to create a new template documentation page

Template parameters

ParameterDescriptionDefaultStatus
xname (param)Name of the documented template's xth parameter (1 names the first parameter, 2 the second, etc)emptyoptional
xd
xd-en
xdescription
xdescription-en
description (param)Description of parameter x (1d describes the documented template's first parameter, 2d the second, etc) -langcode (→ see also on mediawiki: overview or details)emptyoptional
xd-td
xd-td-en
xdescription-td
xdescription-td-en
TemplateData description (param)Description of parameter x for Extension:TemplateData which does not accept Wiki-markup. If this parameter is omitted, xd is used. You can always override the defaults specifically for TemplateData by appending -td to the parameter-name. You can specify a language by appending your language-code. E.g. 3d-td-en would be the English translation of the description of parameter 3 which will be used in TemplateData. -langcode. 1d-td describes the documented template's first parameter, 2d-td the second, etc)emptyoptional
xlabel
xlabel-en
xlabel-td
xlabel-td-en
label (param)A (very) brief name for parameter x. Try to keep under 20-ish characters. For example, 1label-de would be the German label of the documented template's first parameter. -langcode (→ see also on mediawiki: overview or details)emptyoptional
xaliasesaliases (param)An alias is an alternative name for the parameter that may be used instead of (not in addition to) the primary name. Name the aliases and separate them by "/"; e.g.d/desc/description. (→ see also on mediawiki: overview or details)emptyoptional
xtypetype (param)The type of the parameter, for (soft) type hinting. Please refer to the list of possible values. (→ see also on mediawiki: overview or details)emptyoptional
xsetset (param)Label and ID of a set in one.[Please clarify – October 2024] Multiple parameters can be grouped in a set, if either none or all of them must be supplied. Try to keep under 20-ish characters. (→ see also on mediawiki: overview)emptyoptional
xdef
xdef-td
xdefault
default (param)Fixed default value for parameter x (1def is the value for the first parameter, 2def the value for the second, etc) -langcode (→ see also on mediawiki: overview or details)emptyoptional
xavautovalue (param)Dynamically-generated default value in wikitext, such as today's date or the editing user's name; this will often involve wikitext substitution, such as {{subst:CURRENTYEAR}}. (→ see also on mediawiki: overview or details)not specifiedoptional
xsvsuggested (param)Suggested values, separated by "/" (→ see also on mediawiki: overview or details)not specifiedoptional
xstat
xstat-td
xdeprecated
xrequired
status (param)Status of parameter x (1stat is the first parameter's status, 2stat the second's, etc); possible values:
required
optional
optional-
optional and not present in the standard form
deprecated
optionaloptional
useTemplateDataexpose TemplateDataWhether the template should expose TemplateData - omitting means "false". Setting to 1, true, or yes means "true". Setting to only will suppress the house-made table.[Please clarify – October 2024] Setting to export will turn TemplateBox into a preformatted Copy & Paste template. Setting to TNT or TNT:template name will cause TemplateData to be handled handled by Module:TNT.[Please clarify – October 2024]emptysuggested
nametitle (template)name of the template (needed for viewing the documentation on another page than the template page, in particular for viewing the documentation page separately){{BASEPAGENAME}}required
desc
desc-en
description
description-en
desc-td
description-td
description (template)description of what the template does -langcodeemptyrequired
shorthandaliasesAliases to ease invocation, separated by commas. Each alias must have a page which redirects to the template page. For example, if {{Catseealso}} and {{Csa}} are aliases for {{Cat see also}}, Template:Catseealso and Template:Csa are redirects to Template:Cat see also.

Aliases are listed on the documented template's page, in the Usage section (like the one on this page), directly under the synopsis (and above the Usage notes if there are some). See examples of lists of redirects here and with an additional searches-for-more-redirects here.

emptyoptional
usage-notesusage notesNotes about usage of the template which will be displayed in the Usage section (like the one in this page) under the invocation template (and any aliases)emptyoptional
namespacenamespacenamespaces, the template is intended to be used in; possible values:
all
talks
contents
Main
Talk
User
User talk
Commons
Commons talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
Creator
Creator talk
Special
Any other values will show as “unknown”.
no namespace specifiedrequired
usergroupusergroupusergroup that is meant to use the template; possible values:
  • all
  • bot
  • administrator
  • admin
  • sysop
  • bureaucrat
  • crat
  • checkuser
  • licensereviewer
  • vrt
  • autoconfirmed
  • autopatrolled
  • filemover
  • oversight
  • patroller
  • rollbacker
  • steward
  • upwizcampeditors
no user group specifiedrequired
placementplacementplacement on the page; possible values:
top
bottom
licence
source
emptyoptional
typetype (template)what type is the template (infobox, formatting, licence tag, …)emptyoptional
exampleexample call parametersExample invocation (set of parameter values). A possible value (e.g. for {{Cat see also}}) can be: lakes. Multiple parameters can be separated with the {{!}} magic word; for example, 1=lakes{{!}}for=for more information sets 2 parameters (for the same template).
There is also example2 for a second example.
emptyoptional
example-valueexample call resultResult of the invocation of the template with the values set in the example parameter. This parameter's value is almost always set by invoking the documented template with the values defined in example. In the example above, the value of example-value would be defined using {{ Cat see alsolakes }}; with two parameters it will be {{Cat see also|lakes|for=for more information}}. The documented template's page will show the result in a box separated from the example code by a "renders as:" line. See {{Own using}} for an example of a template which uses this parameter.
There is also example2-value for a second example.
{{TEMPLATENAME|<example>}}optional
i18n-methodtranslation methodmethod the localization is achieved by. See Commons:Template i18n for more details. Known values:
autotranslate
using {{Autotranslate}} or applying a similar method
switch
using {{LangSwitch}} in the template itself
-
no localization needed
custommediawiki-msg
using MediaWiki namespace messages
mediawiki-msg
using MediaWiki namespace messages, translated on translatewiki.net
ext.translate
using {{Autotranslate}} or applying a similar method on a subpage that is marked for translation using the translate extension
tnt
Using Module:TNT and a tabular translations file on Wikimedia Commons.
wikidata
Historically used Wikidata as a source of translations, via the now-deprecated {{label}} template. It has been superseded by template-local hardcoded names; access from Lua can be done through Module:Wikidata label or Module:Core (getLabel function).
emptyoptional
i18n-desctranslation infoadditional info about the localizationemptyoptional
i18n-mediawiki-msgmediawiki-messageWhen using “mediawiki-msg” as method, optionally put the name of the message here. Falls back to:emptyoptional
i18n-subpagetranslation subpageWhen using “ext.translate” as method, optionally put the name of the sub-page here. A dot (.) means that the current template hosts the translation on its subpages directly.i18noptional
i18n-data-fileI18n Data FileThe tabular data file on Wikimedia Commons in the Data namespace. The I18n/ prefix and the .tab file extension are added automatically if its missing.I18n/{{{name}}}.taboptional
seealsosee alsoList of relevant links (each on a new code line; e.g. * [[Commons:TemplateData]])emptyoptional
setscatscategorizes intoList of categories which are automatically set by the template (each on a new code line; e.g. * [[:Category:Rivers]])emptyoptional
printprintThe way the parameters are typically arranged in the Usage-section; possible values:
  • one - parameters arranged in one line (default):
 |1def= |1stat= |useTemplateData= 
  • multi - parameters arranged in multiple lines:
 |1def =
 |1stat =
 |useTemplateData =
  • infobox - multiple lines, the equals signs are aligned with each other:
 |1def            =
 |1stat           =
 |useTemplateData = 
one (if type parameter ≠ infoboxthis dependency is not working, everytime "one" by default)optional
linesDeprecated! Use parameter print instead.emptydeprecated
reliesonrelies onList of templates on which the template's basic functionality relies (each on a new code line; e.g. * [[Module:TemplateBox]])emptyoptional
mustbesubstmust be substSet to yes (or any value) if the template must be substituted. This puts "subst:" into the template example under Usage-section.emptyoptional
docsub-pagedocsub-pagepage parameter from {{Documentation subpage}}{{NAMESPACE}}:{{BASEPAGENAME}}optional
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

This template (<span style="white-space:nowrap;">&#123;&#123;TemplateBox&#125;&#125;</span>) eases documentation of (other) templates. Using it helps uniformizing template documentation pages. See: [[Commons:Template documentation]] and [[Commons:TemplateData]].

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
name (param)<var>x</var>

Name of the documented template's parameter #x (1 names the first parameter, 2 the second, etc)

Stringoptional
aliases (param)<var>x</var>aliases

An alias is an alternative name for the parameter that may be used instead of (not in addition to) the primary name. Name the aliases and separate them by "'''/'''"; e.g.'''d/desc/description'''. <small>''(→ see also on mediawiki: [[mw:Extension:TemplateData#Param object|overview]] or [[mw:Help:TemplateData#aliases|details]])''</small>

Stringoptional
autovalue (param)<var>x</var>av

Dynamically-generated default value in wikitext, such as today's date or the editing user's name; this will often involve wikitext substitution, such as "subst:CURRENTYEAR".

Default
not specified
Stringoptional
description (param)<var>x</var>d xd-en xdescription xdescription-en

Description of parameter x (1d describes the documented template's first parameter, 2d the second, etc)

Stringoptional
TemplateData description (param)<var>x</var>d-td xd-td-en xdescription-td xdescription-td-en

Description of parameter x for the TemplateData extension which does not accept Wiki-markup. If this parameter is omitted, xd is used. You can always override the defaults specifically for TemplateData by appending "-td" to the parameter-name. You can specify a language by appending a language code. E.g. 3d-td-en would be the English translation of the description of parameter 3 which will be used in TemplateData. [[#Translation|<sup title="Supports internal translation" style="display: inline-block; background-color: #000; font-family: monospace; font-weight: bold; font-style: italic; margin: 0px 1px; padding: 0px 3px; border: 1px solid #fff; box-shadow: 1px 1px 2px #000; color:#fff; cursor:default">-langcode</sup>]]. 1d-td describes the documented template's first parameter, 2d-td the second, etc)

Stringoptional
default (param)<var>x</var>def xdef-td xdefault

Fixed default value for parameter x (1def is the value for the first parameter, 2def the value for the second, etc)

Unknownoptional
label (param)<var>x</var>label xlabel-en xlabel-td xlabel-td-en

A (very) brief name for parameter x. Try to keep under 20-ish characters. For example, 1label-de would be the German label of the documented template's first parameter.

Stringoptional
set (param)<var>x</var>set

Label and ID of a set in one.<small style="display:inline-block;font-size:83%;line-height:normal"><sup>[<bdi><em>[[:w:Wikipedia:Please clarify|Please clarify]]</em></bdi>&nbsp;– <em>October 2024</em>[[Category:Pages needing clarification]]]</sup></small> Multiple parameters can be grouped in a set, if either none or all of them must be supplied. Try to keep under 20-ish characters. <small>''(→ see also on mediawiki: [[mw:Extension:TemplateData#TemplateData object|overview]])''</small>

Stringoptional
status (param)<var>x</var>stat xstat-td xdeprecated xrequired

Status of parameter <var>x</var> (<code>1stat</code> is the first parameter's status, <code>2stat</code> the second's, etc); possible values:

required
optional
optional-
optional and not present in the standard form
deprecated

Suggested values
required suggested optional optional- deprecated
Default
optional
Stringoptional
suggested (param)<var>x</var>sv

Suggested values, separated by "/"

Default
not specified
Unknownoptional
type (param)<var>x</var>type

The type of the parameter, for (soft) type hinting. Please refer to the [https://github.com/wikimedia/mediawiki-extensions-TemplateData/blob/master/Specification.md#34-type list of possible values]. <small>''(→ see also on mediawiki: [[mw:Extension:TemplateData#Param object|overview]] or [[mw:Help:TemplateData#type|details]])''</small>

Stringoptional
description (template)desc desc-en description description-en desc-td description-td

description of what the template does

Stringrequired
docsub-pagedocsub-page

“page” parameter from {{Documentation subpage}}

Default
{{NAMESPACE}}:{{BASEPAGENAME}}
Page nameoptional
example call parametersexample

Example invocation (set of parameter values). A possible value (e.g. for [[:Template:Cat see also|<span style="font-family:monospace,monospace;">&#123;&#123;Cat see also&#125;&#125;</span>]]) can be: <code>lakes</code>. Multiple parameters can be separated with [https://www.mediawiki.org/wiki/Help:Magic%20words the <code>{{!}}</code> magic word]; for example, <code>1=lakes{{!}}for=for more information</code> sets 2 parameters (for the same template).<br>There is also <code>example2</code> for a second example. <table class="plainlinks messagebox mbox-query" role="presentation"><tr><td class="mbox-image">[[File:Warning.svg|alt=Exclamation mark|30px]]</td><td class="mbox-text">If this parameter is set to anything more than a single (anonymous) value for the first unnamed parameter, it is currently needed to set <code>example-value</code> too (as <span style="white-space:nowrap;">&#123;&#123;TemplateBox&#125;&#125;</span> does not call itself properly).</td></tr></table>

Stringoptional
example call resultexample-value

Result of the invocation of the template with the values set in the <code>example</code> parameter. This parameter's value is almost always set by invoking the documented template with the values defined in <code>example</code>. In the example above, the value of <code>example-value</code> would be defined using &#123;&#123;&#160;<span class="monospaced">[[Template:Cat see also|Cat see also]]</span>&#32;&#124;&#160;<span style="font-family:Verdana,serif;font-style:italic;font-size:96%;">lakes</span>&#160;&#125;&#125;; with two parameters it will be '''{{Cat see also|lakes|for=for more information}}'''. The documented template's page will show the result in a box separated from the example code by a "renders as:" line. See [[:Template:Own using|<span style="font-family:monospace,monospace;">&#123;&#123;Own using&#125;&#125;</span>]] for an example of a template which uses this parameter.<br>There is also <code>example2-value</code> for a second example. <table class="plainlinks messagebox mbox-query" role="presentation"><tr><td class="mbox-image">[[File:Warning.svg|alt=Exclamation mark|30px]]</td><td class="mbox-text">If <code>example</code> is set, and not just a single parameter value, it is currently required to set this parameter (as <span style="white-space:nowrap;">&#123;&#123;TemplateBox&#125;&#125;</span> does not call itself properly). Not doing so causes unspecified behavior.<br>If <code>example</code> is not set, this parameter is ignored.</td></tr></table>

Default
{{TEMPLATENAME|&lt;example&gt;}}
Stringoptional
I18n Data Filei18n-data-file

The tabular data file on Wikimedia Commons in the Data namespace. The “I18n/” prefix and the “.tab” file extension is added automatically if its missing.

Default
I18n/{{{name}}}.tab
Auto value
I18n/{{subst:ROOTPAGENAME}}.tab
Stringoptional
translation infoi18n-desc

additional info about the localization

Stringoptional
mediawiki-messagei18n-mediawiki-msg

When using “mediawiki-msg” as method, optionally put the name of the message here. Falls back to:

Stringoptional
translation methodi18n-method

method the localization is achieved by. See [[Commons:Template i18n]] for more details. Known values:

autotranslate
using [[:Template:Autotranslate|<span style="font-family:monospace,monospace;">&#123;&#123;Autotranslate&#125;&#125;</span>]] or applying a similar method
switch
using [[:Template:LangSwitch|<span style="font-family:monospace,monospace;">&#123;&#123;LangSwitch&#125;&#125;</span>]] in the template itself
-
no localization needed
custommediawiki-msg
using MediaWiki namespace messages
mediawiki-msg
using MediaWiki namespace messages, translated on [[translatewiki:|translatewiki.net]]
ext.translate
using [[:Template:Autotranslate|<span style="font-family:monospace,monospace;">&#123;&#123;Autotranslate&#125;&#125;</span>]] or applying a similar method on a subpage that is marked for translation using the translate extension
tnt
Using [[Module:TNT]] and a tabular translations file on Wikimedia Commons.
wikidata
Historically used [[:w:Wikidata|Wikidata]] as a source of translations, via the now-deprecated {{label}} template. It has been superseded by template-local hardcoded names; access from Lua can be done through [[Module:Wikidata label]] or [[Module:Core]] (<code>getLabel</code> function).

Suggested values
- autotranslate ext.translate switch mediawiki-msg custommediawiki-msg TNT
Stringoptional
translation subpagei18n-subpage

When using “ext.translate” as method, optionally put the name of the sub-page here. A dot ('''.''') means that the current template hosts the translation on its subpages directly.

Default
i18n
Stringoptional
lines

''Deprecated!'' Use parameter <code>print</code> instead.

Unknowndeprecated
must be substmustbesubst

Set to '''yes''' (or any value) if the template must be substituted. This puts "subst:" into the template example under [[#Usage|Usage]]-section.

Stringoptional
title (template)name

name of the template <small>''(needed for viewing the documentation on another page than the template page, in particular for viewing the documentation page separately)''</small>

Default
<small>{{'''BASE'''PAGENAME}}</small>
Page namerequired
namespacenamespace

namespaces, the template is intended to be used in; possible values:

all
talks
contents
Main
Talk
User
User talk
Commons
Commons talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
Creator
Creator talk
Special
Any other values will show as “unknown”.

Default
no namespace specified
Stringrequired
placementplacement

placement on the page; possible values:

top
bottom
licence
source

Suggested values
top bottom license source
Stringoptional
printprint

The way the parameters are typically arranged in the [[#Usage|Usage]]-section; possible values:

  • '''one''' - parameters arranged in one line (default):
  • '''multi''' - parameters arranged in multiple lines:
  • '''infobox''' - multiple lines, the equals signs are aligned with each other:

Suggested values
multi one infobox
Default
one (if type parameter ≠ '''infobox'''<sup>[[Template talk:TemplateBox#Parameter "print" - dependency with "type"-parameter not working|this dependency is not working, everytime "one" by default]]</sup>)
Stringoptional
relies onrelieson

List of templates on which the template's basic functionality relies (each on a new code line; e.g. '''* [[Module:TemplateBox]]''')

Stringoptional
see alsoseealso

List of relevant links (each on a new code line; e.g. '''* [[Commons:TemplateData]]''')

Stringoptional
categorizes intosetscats

List of categories which are automatically set by the template (each on a new code line; e.g. '''* [[:Category:Rivers]]''')

Stringoptional
aliasesshorthand

Aliases to ease invocation, separated by commas. Each alias must have a page which redirects to the template page. For example, if [[:Template:Catseealso|<span style="font-family:monospace,monospace;">&#123;&#123;Catseealso&#125;&#125;</span>]] and [[:Template:Csa|<span style="font-family:monospace,monospace;">&#123;&#123;Csa&#125;&#125;</span>]] are aliases for [[:Template:Cat see also|<span style="font-family:monospace,monospace;">&#123;&#123;Cat see also&#125;&#125;</span>]], [[Template:Catseealso]] and [[Template:Csa]] are redirects to [[Template:Cat see also]]. <table class="plainlinks messagebox mbox-query" role="presentation"><tr><td class="mbox-image">[[File:Warning.svg|alt=Exclamation mark|30px]]</td><td class="mbox-text">Despite this parameter's name, an alias's length can be equal to or higher than the canonical name's (for example, [[:Template:Semicolon|<span style="font-family:monospace,monospace;">&#123;&#123;Semicolon&#125;&#125;</span>]] is an alias of [[:Template:&#59;|<span style="font-family:monospace,monospace;">&#123;&#123;&#59;&#125;&#125;</span>]]).</td></tr></table> <p>Aliases are listed on the documented template's page, in the ''Usage'' section (like [[#Usage|the one on this page]]), directly under the synopsis (and above the ''Usage notes'' if there are some). See examples of lists of redirects [[Template:CatDiffuse/doc|here]] and with an additional searches-for-more-redirects [[Template:Cat see also/doc|here]].</p>

Stringoptional
type (template)type

what type is the template ('''infobox''', '''formatting''', '''licence tag''', …)

Stringoptional
usage notesusage-notes

Notes about usage of the template which will be displayed in the ''Usage'' section (like [[#Usage|the one in this page]]) under the invocation template (and any aliases)

Stringoptional
expose TemplateDatauseTemplateData

Whether the template should expose TemplateData - Omitting means "false". Setting to “1”, “true”, or “yes” means "true". Setting to “only” will suppress the house-made table. Setting useTemplateData to “export” will turn TemplateBox into a preformatted Copy & Paste template. Seting to “TNT” or “TNT:template name” will cause TemplateData to be handled handled by Module:TNT.

Suggested values
1 only TNT TNT:{{subst:BASEPAGENAME}}
Auto value
only
Stringsuggested
usergroupusergroup

usergroup that is meant to use the template; possible values:

  • <code>all</code>
  • <code>bot</code>
  • <code>administrator</code>
  • <code>admin</code>
  • <code>sysop</code>
  • <code>bureaucrat</code>
  • <code>crat</code>
  • <code>checkuser</code>
  • <code>licensereviewer</code>
  • <code>vrt</code>
  • <code>autoconfirmed</code>
  • <code>autopatrolled</code>
  • <code>filemover</code>
  • <code>oversight</code>
  • <code>patroller</code>
  • <code>rollbacker</code>
  • <code>steward</code>
  • <code>upwizcampeditors</code>

    Suggested values
    all bot administrator admin sysop bureaucrat crat checkuser licensereviewer otrs autoconfirmed autopatrolled filemover oversight patroller rollbacker steward upwizcampeditors
    Default
    no user group specified
Stringrequired

Additional information

The template is intended to be used in the following namespaces: the Template namespace

The template is intended to be used by the following user groups: all users

Placement:

in the '/doc' subpage of a template

Relies on:

See also

Localization

العربية  Boarisch  беларуская (тарашкевіца)  বাংলা  català  čeština  dansk  Deutsch  Deutsch (Sie-Form)  Zazaki  English  español  eesti  euskara  فارسی  suomi  français  galego  ગુજરાતી  עברית  हिन्दी  hrvatski  magyar  Bahasa Indonesia  italiano  日本語  한국어  Lëtzebuergesch  latviešu  македонски  മലയാളം  मराठी  Bahasa Melayu  မြန်မာဘာသာ  norsk bokmål  Plattdüütsch  Nederlands  norsk nynorsk  polski  português  português do Brasil  русский  sicilianu  slovenčina  slovenščina  српски / srpski  svenska  ไทย  Türkçe  українська  Tiếng Việt  中文  中文(简体)  中文(繁體)

This template makes use of {{Autotranslate}} and the translate extension. The layout of the template can be found under Template:TemplateBox/layout.

Template to create a new template documentation page

The following code template contains brief descriptions for each parameter as well as space for categories and can be copy-pasted in new documentation pages. The meta-parameters are not internationalized (names have no language code).

{{TemplateBox
 <!-- TEMPLATE PARAMETERS SECTION (for 2nd parameter, copy, paste & change "1" → "2") -->
 |1          = <!-- 1st parameter: name of the first parameter the template takes-->
  |1label    = <!-- 1st parameter: label, very brief name, preferably less than 20 characters -->
  |1d        = <!-- 1st parameter: description (+LANGUAGE CODE) -->
  |1d-td     = <!-- 1st parameter: description for TemplateData without any wiki markup (+LANGUAGE CODE) -->
  |1aliases  = <!-- 1st parameter: alternative names that may be used, separated by "/" -->
  |1type     = <!-- 1st parameter: type (values: number, string, line, boolean, date, url, wiki-page-name, unknown/…) -->
  |1set      = <!-- 1st parameter: set ID / Label (to group multiple parameters in a set) -->
  |1def      = <!-- 1st parameter: fixed default value (+LANGUAGE CODE) -->
  |1av       = <!-- 1st parameter: autovalue, dynamically-generated default value, e.g. current year -->
  |1sv       = <!-- 1st parameter: suggested values to help users select the desired value, separated by "/" -->
  |1stat     = <!-- 1st parameter: status (values: required, optional, optional- or deprecated) -->
 <!-- TEMPLATE SECTION -->
 |useTemplateData    = <!-- expose TemplateData (values: true, export; default: false) -->
 |name               = <!-- template title -->
 |desc               = <!-- template description (+LANGUAGE CODE) -->
 |namespace          = <!-- namespaces, the template is intended to be used (values: all, File, Category…) -->
 |usergroup          = <!-- usergroup that is meant to use the template (values: all, admin…) -->
 |placement          = <!-- placement on the page (values: top, bottom, licence or source) -->
 |usage-notes        = <!-- notes about the correct usage of the template -->
 |type               = <!-- template type (values: infobox, formatting, licence tag,…) -->
 |example            = <!-- example parameter values -->
 |example-value      = <!-- example invocation of the template with the values of the example parameter -->
 |i18n-method        = <!-- translation method (values: mediawiki-msg, ext.translate, autotranslate…) -->
 |i18n-desc          = <!-- translation info -->
 |i18n-mediawiki-msg = <!-- name of the message when using “mediawiki-msg” as method -->
 |i18n-subpage       = <!-- translation subpage when using "ext.translate" as method -->
 |i18n-data-file     = <!-- tabular data file on Wikimedia Commons in the Data namespace -->
 |seealso            = <!-- relevant links (each of them on a new code line with * in the beginning) -->
 |setscats           = <!-- categories which are automatically set by the template -->
 |print              = <!-- template code layout in the Usage-section (values: one, multi, infobox) -->
 |shorthand          = <!-- redirects to the main template -->
 |relieson           = <!-- list of templates on which the template's basic functionality relies -->
 |mustbesubst        = <!-- set to yes (or any value) if the template must be substituted. -->
 |docsub-page        = <!-- page parameter from {{Documentation subpage}} -->
}}<includeonly>{{Sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->

}}</includeonly>

TemplateData

{{Commons:TemplateData}}

edit

One issue caused by usage of this template is the loss of section editing links on the whole page of the documented template, and also on its documentation page, even for paragraphs outside the part produced by this template (TemplateBox).

This can be worked around by manually invoking {{Sed}} in each section to create an edit link anyway, but this technique is fragile since the first argument for {{Sed}} can change when the section structure changes, which quietly breaks such links. The link in this very section was broken for years, pointing to the wrong section, until the value was updated ({{Sed|1}}{{Sed|3}}). Moreover, {{Sed}} wastes vertical space (standing on its own line).

Cookies help us deliver our services. By using our services, you agree to our use of cookies.