Template:W/doc

From Hârn
Jump to navigation Jump to search
<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.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

Recommendation

Instead of an external link to sister projects e.g. [http://en.wikipedia.org en.wikipedia] use better an internal one like {{W||en.wikipedia}}.

Examples

All parameter combinations

000 {{W}} → Template:W/doc [1]

003 {{W|3=es}} → Template:W/doc [1] Template:F {{We}}: Template:TleTemplate:We
003 {{W|3=pt}} → Template:W/doc [1]

020 {{W||Main Page}} → Page
020 {{W||en:Main Page}} → Page

023 {{W||Ĉefpaĝo|eo}} → [1]
023 {{W||pt:Wikipedia|pt}} → [2] Template:F {{Wp}}: Template:TleTemplate:W/doc
023 {{W||pt:Wp|pt}} → [3] (preferred style of a link to a national mainpage)
023 {{W||de:Wp|de}} → [4] Template:F {{Wd}}: Template:Tlede:Wp

100 {{W|Page name}} → Page name

103 {{W|Page name||it}} → Page name Template:F {{Wi}}: Template:TleTemplate:Wi

103 {{W|Page name||fr}} → Page name Template:F {{Wf}}: Template:Tle


103 {{W|{{FULLPAGENAME}}|3=pl}} → Template:W/doc

120 {{W|Page name|Display name}} → Display name

123 {{W|Page name|Display name|nl}} → Display name Template:F {{Wn}}: Template:TleTemplate:Wn
123 {{W|Page name|Display name|hu}} → Display name Template:F {{Wh}}: Template:Tle → == Welcome! ==

Hello {{SUBST:PAGENAME}}! Welcome to Wikipedia! Thank you for [[Special:Contributions/{{SUBST:PAGENAME}}|your contributions]]. If you decide that you need help, check out Getting Help below, ask me on my talk page, or place {{helpme}} on your talk page and someone will show up shortly to answer your questions. Please remember to sign your name on talk pages by clicking Button sig.png or using four tildes (~~~~); this will automatically produce your name and the date. Finally, please do your best to always fill in the edit summary field. Below are some useful links to facilitate your involvement. Happy editing! ~~~~
Getting Started
Getting Help
Policies and Guidelines

The Community
Things to do
Miscellaneous
  1. a b c


Complex page name examples
3=de de:Wikipedia Benutzer Diskussion:Andreas_06/Spielwiese/Stadien_der_Fußball-Bundesliga
3=fr fr:Wikipédia Discussion aide:Catégorie/Archive3#Appels à volontaires pour Aide à la conception de l'arborescence
3=yi yi:Wikipedia ענדערן הילף:אינהאלט
3=pt pt:Wikipedia Categoria:Cidades fantasmas da CalifórniaPredefinição Discussão:!Info pessoal
3= en:Wikipedia Template talk:Welcome/fr#Pas assez informatif
3=nl:b nl:Wikibooks Scalable Vector Graphics/Stijl
3=en:d en:Wikidata Project chat
3=en:n en:Wikinews Egyptian MP calls for web porn ban
3=fi:q fi:Wikiquote Elizabeth II
3=es:s es:Wikisource Archivo:Las Maravillas Del Cielo pg 7.jpg
3=sv:v sv:Wikiversity Surdegsbakning för hemmabagaren
3=pl:voy pl:Wikivoyage San Francisco
3=lt:wikt lt:Wiktionary Sąrašas:Kinų hieroglifų raktai
3=m 00 Metawiki VisualEditor/Newsletter/2014/November/ka
3=mw 00 Mediawiki Extension:ParserFunctions/it
3=species 0Wikispecies Verrucaria halizoa
3=en:commons en:Commons Template:W