Difference between revisions of "Template:Documentation/doc"
m (47 revisions imported) |
|||
(16 intermediate revisions by 11 users not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>{{Documentation subpage}} | + | <noinclude>{{Documentation subpage}}</noinclude> |
− | + | ||
− | </noinclude> | + | |
This template automatically displays a documentation box like you are seeing now, of which the content is transcluded from another page. It is intended for pages which are [[Wikipedia:Transclusion|transcluded]] in other pages, i.e. templates, whether in the template namespace or not. | This template automatically displays a documentation box like you are seeing now, of which the content is transcluded from another page. It is intended for pages which are [[Wikipedia:Transclusion|transcluded]] in other pages, i.e. templates, whether in the template namespace or not. | ||
Line 7: | Line 5: | ||
==Usage== | ==Usage== | ||
===Normal=== | ===Normal=== | ||
− | + | <noinclude><nowiki>{{TNT|Documentation}}</nowiki><noinclude> | |
− | <noinclude>{{ | + | or |
− | or <noinclude>{{ | + | <noinclude><nowiki>{{TNT|Documentation|</nowiki>Template:<var>any page</var>/doc<nowiki>}}</nowiki><noinclude> |
− | + | ||
This code should be added at the bottom of the template code, with no extra space before "<code><noinclude></code>" (which would cause extra space on pages where the template is used). The parameter can be used as shown above to transclude an arbitrary documentation page. | This code should be added at the bottom of the template code, with no extra space before "<code><noinclude></code>" (which would cause extra space on pages where the template is used). The parameter can be used as shown above to transclude an arbitrary documentation page. | ||
− | Add categories and interwiki links to the documentation page inside includeonly tags. | + | Add categories and interwiki links to the documentation page inside <code>includeonly</code> tags. |
− | If the documentation page contains includeonly or noinclude tags as part of the documentation, replace the "<" with "&lt;". | + | If the documentation page contains <code>includeonly</code> or <code>noinclude</code> tags as part of the documentation, replace the "<code><</code>" with "<code>&lt;</code>". |
===Customizing display=== | ===Customizing display=== | ||
Line 26: | Line 23: | ||
==Rationale== | ==Rationale== | ||
− | This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation, categories, and interwiki links. It also reduces server resources by circumventing a [[Wikipedia:Template limits|technical limitation of templates]] (see a [{{fullurl:Project:Village pump (technical)|diff=prev&oldid=69888944}} developer's explanation]). | + | This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation, categories, and interwiki links. It also reduces server resources by circumventing a [[:en:Wikipedia:Template limits|technical limitation of templates]] (see a [{{fullurl:en:Project:Village pump (technical)|diff=prev&oldid=69888944}} developer's explanation]). |
==See also== | ==See also== | ||
− | + | * {{tiw|documentation subpage}} | |
− | * {{tiw|documentation subpage}} | + | |
*{{tim|Documentation}} | *{{tim|Documentation}} | ||
− | |||
− | |||
* [[w:Wikipedia:Template documentation]] | * [[w:Wikipedia:Template documentation]] | ||
Line 43: | Line 37: | ||
[[Category:Formatting templates|Template documentation]] | [[Category:Formatting templates|Template documentation]] | ||
+ | [[en:Template:Documentation]] | ||
[[eo:Ŝablono:Dok]] | [[eo:Ŝablono:Dok]] | ||
[[es:Plantilla:Uso de plantilla]] | [[es:Plantilla:Uso de plantilla]] | ||
− | [[fr:Modèle:Documentation | + | [[fr:Modèle:Documentation]] |
[[hsb:Předłoha:Doc]] | [[hsb:Předłoha:Doc]] | ||
[[hu:Sablon:Sablondokumentáció]] | [[hu:Sablon:Sablondokumentáció]] | ||
Line 51: | Line 46: | ||
[[nl:Sjabloon:Sjabdoc]] | [[nl:Sjabloon:Sjabdoc]] | ||
[[ru:Шаблон:Doc]] | [[ru:Шаблон:Doc]] | ||
+ | [[pl:Szablon:Dokumentacja]] | ||
[[sl:Predloga:Dokumentacija]] | [[sl:Predloga:Dokumentacija]] | ||
− | [[uk:Шаблон: | + | [[uk:Шаблон:Документація]] |
− | [[zh:Template: | + | [[zh:Template:Documentation]] |
</includeonly> | </includeonly> |
Latest revision as of 05:22, 3 September 2016
Template:Documentation subpage
This template automatically displays a documentation box like you are seeing now, of which the content is transcluded from another page. It is intended for pages which are transcluded in other pages, i.e. templates, whether in the template namespace or not.
Usage
Normal
<noinclude>{{TNT|Documentation}}<noinclude>
or
<noinclude>{{TNT|Documentation|Template:any page/doc}}<noinclude>
This code should be added at the bottom of the template code, with no extra space before "<noinclude>
" (which would cause extra space on pages where the template is used). The parameter can be used as shown above to transclude an arbitrary documentation page.
Add categories and interwiki links to the documentation page inside includeonly
tags.
If the documentation page contains includeonly
or noinclude
tags as part of the documentation, replace the "<
" with "<
".
Customizing display
Overrides exist to customize the output in special cases:
- {{documentation|heading=}}: change the text of the "documentation" heading. If this is set to blank, the entire heading line (including the first [edit] link) will also disappear.
Functions
If the documentation page doesn't exist, the "edit" link includes a preload parameter so that clicking it will pre-fill the edit form with the basic documentation page format.
Rationale
This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation, categories, and interwiki links. It also reduces server resources by circumventing a technical limitation of templates (see a developer's explanation).
See also
[[Project:Language policy|]] | |English {{#ifexist: {{#if:||Template:Documentation/doc}}/af
| • {{#if: |Afrikaans |Afrikaans }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/ar | • {{#if: |العربية |العربية }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/ast | • {{#if: |asturianu |asturianu }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/az | • {{#if: |azərbaycanca |azərbaycanca }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/bcc | • {{#if: |جهلسری بلوچی |جهلسری بلوچی }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/bg | • {{#if: |български |български }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/br | • {{#if: |brezhoneg |brezhoneg }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/bn | • {{#if: |বাংলা |বাংলা }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/bs | • {{#if: |bosanski |bosanski }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/ca | • {{#if: |català |català }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/cs | • {{#if: |čeština |čeština }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/da | • {{#if: |dansk |dansk }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/de | • {{#if: |Deutsch |Deutsch }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/diq | • {{#if: |Zazaki |Zazaki }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/el | • {{#if: |Ελληνικά |Ελληνικά }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/eo | • {{#if: |Esperanto |Esperanto }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/es | • {{#if: |español |español }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/fa | • {{#if: |فارسی |فارسی }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/fi | • {{#if: |suomi |suomi }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/fr | • {{#if: |français |français }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/gl | • {{#if: |galego |galego }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/gu | • {{#if: |ગુજરાતી |ગુજરાતી }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/he | • {{#if: |עברית |עברית }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/hi | • {{#if: |हिन्दी |हिन्दी }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/hu | • {{#if: |magyar |magyar }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/hy | • {{#if: |Հայերեն |Հայերեն }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/id | • {{#if: |Bahasa Indonesia |Bahasa Indonesia }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/io | • {{#if: |Ido |Ido }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/it | • {{#if: |italiano |italiano }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/ja | • {{#if: |日本語 |日本語 }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/ka | • {{#if: |ქართული |ქართული }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/kk | • {{#if: |қазақша |қазақша }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/km | • {{#if: |ភាសាខ្មែរ |ភាសាខ្មែរ }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/ko | • {{#if: |한국어 |한국어 }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/ksh | • {{#if: |Ripoarisch |Ripoarisch }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/kw | • {{#if: |kernowek |kernowek }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/la | • {{#if: |Latina |Latina }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/min | • {{#if: |Baso Minangkabau |Baso Minangkabau }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/mk | • {{#if: |македонски |македонски }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/ml | • {{#if: |മലയാളം |മലയാളം }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/mr | • {{#if: |मराठी |मराठी }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/ms | • {{#if: |Bahasa Melayu |Bahasa Melayu }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/nl | • {{#if: |Nederlands |Nederlands }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/no | • {{#if: |norsk bokmål |norsk bokmål }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/oc | • {{#if: |occitan |occitan }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/or | • {{#if: |ଓଡ଼ିଆ |ଓଡ଼ିଆ }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/pl | • {{#if: |polski |polski }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/pt | • {{#if: |português |português }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/pt-br | • {{#if: |português do Brasil |português do Brasil }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/ro | • {{#if: |română |română }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/ru | • {{#if: |русский |русский }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/si | • {{#if: |සිංහල |සිංහල }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/sk | • {{#if: |slovenčina |slovenčina }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/sl | • {{#if: |slovenščina |slovenščina }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/so | • {{#if: |Soomaaliga |Soomaaliga }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/sq | • {{#if: |shqip |shqip }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/sr | • {{#if: |српски / srpski |српски / srpski }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/sv | • {{#if: |svenska |svenska }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/ta | • {{#if: |தமிழ் |தமிழ் }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/th | • {{#if: |ไทย |ไทย }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/tr | • {{#if: |Türkçe |Türkçe }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/uk | • {{#if: |українська |українська }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/vi | • {{#if: |Tiếng Việt |Tiếng Việt }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/yi | • {{#if: |ייִדיש |ייִדיש }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/yue | • {{#if: |粵語 |粵語 }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/zh | • {{#if: |中文 |中文 }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/zh-hans | • {{#if: |中文(简体) |中文(简体) }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/zh-hant | • {{#if: |中文(繁體) |中文(繁體) }} }}{{#ifexist: {{#if:||Template:Documentation/doc}}/zh-tw | • {{#if: |中文(台灣) |中文(台灣) }}}} |
---|
| • {{#if:
|Afrikaans |Afrikaans }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/ar | • {{#if:
|العربية |العربية }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/ast | • {{#if:
|asturianu |asturianu }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/az | • {{#if:
|azərbaycanca |azərbaycanca }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/bcc | • {{#if:
|جهلسری بلوچی |جهلسری بلوچی }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/bg | • {{#if:
|български |български }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/br | • {{#if:
|brezhoneg |brezhoneg }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/bn | • {{#if:
|বাংলা |বাংলা }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/bs | • {{#if:
|bosanski |bosanski }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/ca | • {{#if:
|català |català }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/cs | • {{#if:
|čeština |čeština }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/da | • {{#if:
|dansk |dansk }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/de | • {{#if:
|Deutsch |Deutsch }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/diq | • {{#if:
|Zazaki |Zazaki }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/el | • {{#if:
|Ελληνικά |Ελληνικά }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/eo | • {{#if:
|Esperanto |Esperanto }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/es | • {{#if:
|español |español }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/fa | • {{#if:
|فارسی |فارسی }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/fi | • {{#if:
|suomi |suomi }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/fr | • {{#if:
|français |français }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/gl | • {{#if:
|galego |galego }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/gu | • {{#if:
|ગુજરાતી |ગુજરાતી }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/he | • {{#if:
|עברית |עברית }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/hi | • {{#if:
|हिन्दी |हिन्दी }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/hu | • {{#if:
|magyar |magyar }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/hy | • {{#if:
|Հայերեն |Հայերեն }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/id | • {{#if:
|Bahasa Indonesia |Bahasa Indonesia }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/io | • {{#if:
|Ido |Ido }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/it | • {{#if:
|italiano |italiano }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/ja | • {{#if:
|日本語 |日本語 }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/ka | • {{#if:
|ქართული |ქართული }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/kk | • {{#if:
|қазақша |қазақша }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/km | • {{#if:
|ភាសាខ្មែរ |ភាសាខ្មែរ }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/ko | • {{#if:
|한국어 |한국어 }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/ksh | • {{#if:
|Ripoarisch |Ripoarisch }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/kw | • {{#if:
|kernowek |kernowek }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/la | • {{#if:
|Latina |Latina }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/min | • {{#if:
|Baso Minangkabau |Baso Minangkabau }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/mk | • {{#if:
|македонски |македонски }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/ml | • {{#if:
|മലയാളം |മലയാളം }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/mr | • {{#if:
|मराठी |मराठी }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/ms | • {{#if:
|Bahasa Melayu |Bahasa Melayu }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/nl | • {{#if:
|Nederlands |Nederlands }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/no | • {{#if:
|norsk bokmål |norsk bokmål }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/oc | • {{#if:
|occitan |occitan }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/or | • {{#if:
|ଓଡ଼ିଆ |ଓଡ଼ିଆ }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/pl | • {{#if:
|polski |polski }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/pt | • {{#if:
|português |português }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/pt-br | • {{#if:
|português do Brasil |português do Brasil }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/ro | • {{#if:
|română |română }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/ru | • {{#if:
|русский |русский }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/si | • {{#if:
|සිංහල |සිංහල }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/sk | • {{#if:
|slovenčina |slovenčina }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/sl | • {{#if:
|slovenščina |slovenščina }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/so | • {{#if:
|Soomaaliga |Soomaaliga }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/sq | • {{#if:
|shqip |shqip }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/sr | • {{#if:
|српски / srpski |српски / srpski }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/sv | • {{#if:
|svenska |svenska }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/ta | • {{#if:
|தமிழ் |தமிழ் }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/th | • {{#if:
|ไทย |ไทย }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/tr | • {{#if:
|Türkçe |Türkçe }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/uk | • {{#if:
|українська |українська }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/vi | • {{#if:
|Tiếng Việt |Tiếng Việt }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/yi | • {{#if:
|ייִדיש |ייִדיש }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/yue | • {{#if:
|粵語 |粵語 }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/zh | • {{#if:
|中文 |中文 }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/zh-hans | • {{#if:
|中文(简体) |中文(简体) }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/zh-hant | • {{#if:
|中文(繁體) |中文(繁體) }}
}}{{#ifexist: {{#if:||Template:Documentation/doc}}/zh-tw | • {{#if:
|中文(台灣) |中文(台灣) }}
}} ||}}{{#ifeq:{{#ifeq:
{{#titleparts:template:documentation/doc|1|-1}}
| {{#titleparts:template:documentation/doc|1|-1}} | | /{{#titleparts:Template:Documentation/doc|1|-1}} }}|/en||[[Category:Languages pages{{#ifeq:
{{#titleparts:template:documentation/doc|1|-1}}
| {{#titleparts:template:documentation/doc|1|-1}} | | /{{#titleparts:Template:Documentation/doc|1|-1}} }}]]}}