FANDOM


m (1 revision)
 
Line 1: Line 1:
<includeonly>{{#ifeq:{{SITENAME}}|Templates Wiki|<div style="margin:0 1em;clear:both;"><div style="font-size:small;line-height:16px;">
+
<div class="template-documentation" style="clear: both; border: 1px solid black; margin: 1em;"><!--
{{#ifeq:{{{SPW}}}|is not relevant||
+
--><div class="color1" style="padding: 1em; margin: 0;"><!--
:'''''[{{fullurl:Special:Export}}?link1=Template:{{PAGENAMEE}}&link2=Template:{{PAGENAMEE}}/doc{{#if:{{{dep1|}}}
+
-->'''Template documentation''' <!--
|&link3={{{dep1}}}&link4={{{dep1}}}/doc}}{{#if:{{{dep2|}}}
+
--><span style="font-size: 85%;"><!--
|&link5={{{dep2}}}&link6={{{dep2}}}/doc}}{{#if:{{{dep3|}}}
+
-->(for the above template, sometimes hidden or invisible)<!--
|&link7={{{dep3}}}&link8={{{dep3}}}/doc}}{{#if:{{{dep4|}}}
+
--></span> <!--
|&link9={{{dep4}}}&link10={{{dep4}}}/doc}} Export this template]''', then [[Help:Importing|import]], to install it.
+
-->{{#if: {{{content|}}}
<!--:''Or copy [{{FULLURL:{{FULLPAGENAME}}}}?action=edit {{FULLPAGENAME}}]<sup>[[Special:Export/{{FULLPAGENAME}}|export]]</sup>, [{{FULLURL:{{FULLPAGENAME}}/doc}}?action=edit {{FULLPAGENAME}}/doc]<sup>[[Special:Export/{{FULLPAGENAME}}/doc|export]]</sup>{{#if:{{{dep1|}}}|,
+
|
[{{FULLURL:{{{dep1}}}}}?action=edit {{{dep1}}}]<sup>[[Special:Export/{{{dep1}}}|export]]</sup>{{#if:{{{dep2|}}}|,
+
| <span id="doc_editlinks" class="editsection plainlinks" style="font-size: 85%; float:right;"><!--
[{{FULLURL:{{{dep2}}}}}?action=edit {{{dep2}}}]<sup>[[Special:Export/{{{dep2}}}|export]]</sup>}}{{#if:{{{dep3|}}}|,
+
-->{{#ifexist: {{#if: {{{1|}}}
[{{FULLURL:{{{dep3}}}}}?action=edit {{{dep3}}}]<sup>[[Special:Export/{{{dep3}}}|export]]</sup>}}}} to the same locations on your wiki. [[Help:How_to_copy_templates_to_your_wiki|Need help?]]''-->
 
:''Use edit summary: ''<code><nowiki>Copied from [[w:c:templates:</nowiki>{{FULLPAGENAME}}<nowiki>]]</nowiki></code>'' to properly attribute this template's editors.''}}{{#if:{{{vanilla|}}}|
 
:''This template is compatible with vanilla Mediawiki.''}}
 
:''{{#switch: {{{SPW|{{Template:Is SPW}}}}}
 
| is newer
 
| is newer than =[[File:What Is Anime Anime Explained|thumb|right|273 px|Youtube]]
 
[[w:c:templates:Help:Starter pages|This template is probably newer than one that is already on your wiki.]]{{#ifeq: {{SITENAME}} | Templates Wiki | [[Category:Newer than on starter pages|{{PAGENAME}}]] }}
 
| is not relevant
 
| is not relevant to =
 
This template is not on [[w:c:starter|Fandom starter pages]] because it is probably not relevant to wikis other than Templates Wiki. '''You probably don't want to copy this template to your wiki.''' {{#if:{{{SPW-link|}}}|For a similar template intended to be copied, see [[:Template:{{{SPW-link}}}]].}} {{#ifeq: {{SITENAME}} | Templates Wiki | [[Category:Templates Wiki templates|{{PAGENAME}}]] }}
 
| true <!-- Automatically checked against list of SPW templates at Template: Is SPW -->
 
| is on =
 
[[w:c:templates:Help:Starter pages|This template is probably already on your wiki.]]{{#ifeq: {{SITENAME}} | Templates Wiki | [[Category:From starter pages|{{PAGENAME}}]] }}
 
| is not on
 
| #default =
 
[[w:c:templates:Help:Starter pages|This template is probably not already on your wiki.]]
 
}}''</div>
 
</div>
 
{{#ifeq:{{CONTENTLANG}}|ja||{{#if:{{{ja|}}}|[[Category:Interwiki specified]][[ja:{{{ja}}}]]|{{#switch:{{{nothing|{{Is JA}}}}}|true=[[ja:Template:{{PAGENAME}}]]}}}}}}
 
{{#ifeq:{{CONTENTLANG}}|zh||{{#if:{{{zh|}}}|[[Category:Interwiki specified]][[zh:{{{zh}}}]]|{{#switch:{{{nothing|{{Is ZH}}}}}|true=[[zh:Template:{{PAGENAME}}]]}}}}}}
 
{{#ifeq:{{CONTENTLANG}}|en||{{#if:{{{en|}}}|[[Category:Interwiki specified]][[en:{{{en}}}]]|{{#switch:{{{nothing|{{Is EN 1}}{{Is EN 2}}{{Is EN 3}}}}}|true=[[en:Template:{{PAGENAME}}]]}}}}}}|<span style="color:red;">'''You don't want this version of the documentation template on your wiki! [{{fullurl:Template:Documentation}}?action=history Click here to revert it.]'''</span>
 
 
For a documentation template you can use on your wiki, see [[w:c:templates:Template:Documentation (copy)]].}}<!--
 
 
End of documentation blob - the ONLY part returned if called by "Template:Documentation (copy)"
 
 
-->
 
{{#ifeq:{{PAGENAME}}|Documentation (copy)||
 
{{{!}} class="article-table" style="width:100%;" role="complementary"
 
{{!}}- style="font-size:18px;"
 
! style="padding:0px;" {{!}} <div style="width:100%; padding:3px 0px; text-align:center;" class="color1">Template documentation</div>
 
{{!}}-
 
{{!}} ''Note: the template above may sometimes be partially or fully invisible.''
 
{{!}}-
 
{{!}}
 
{{#if:{{{content|}}}|
 
Edit [{{fullurl:{{FULLPAGENAME}}}}?action=edit&preload=Template:Documentation/preload this template for the documentation].|
 
{{#ifexist: {{#if: {{{1|}}}
 
 
| {{{1}}}
 
| {{{1}}}
 
| {{FULLPAGENAME}}/doc
 
| {{FULLPAGENAME}}/doc
}}<!--end if 1--> |
+
}}
View or edit [[:{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}/doc}}|this documentation]].
+
| &#91;[[{{#if: {{{1|}}}
|
+
| {{{1}}}
[{{fullurl:{{#if: {{{1|}}}
+
| {{FULLPAGENAME}}/doc
  +
}}|view]]<!--
  +
-->&#93; <!--
  +
-->[[{{fullurl:{{#if: {{{1|}}}
 
| {{{1}}}
 
| {{{1}}}
 
| {{FULLPAGENAME}}/doc
 
| {{FULLPAGENAME}}/doc
}}<!--end if 1-->
+
}}
  +
| action=edit
  +
}} edit]] <!--
  +
-->[[{{fullurl:{{#if: {{{1|}}}
  +
| {{{1}}}
  +
| {{FULLPAGENAME}}/doc
  +
}}
  +
| action=history
  +
}} history]] <!--
  +
-->[[{{fullurl:{{FULLPAGENAME}}
  +
| action=purge
  +
}} refresh]]
  +
| [[{{fullurl:{{#if: {{{1|}}}
  +
| {{{1}}}
  +
| {{FULLPAGENAME}}/doc
  +
}}
 
| action=edit&preload=Template:Documentation/preload
 
| action=edit&preload=Template:Documentation/preload
}}<!--end if content--> create this documentation]
+
}} create]]
}}<!--end ifeq PAGENAME--> ([[Template:Documentation|How does this work?]])
+
}}<!--
{{!}}-
+
--></span>
{{!}} Editors can experiment with this template's {{#if: {{{sandbox|}}} | {{#switch: {{#sub:{{lc:{{{sandbox}}}}}|0|1}}
+
}}<!--
| y | t | 1 = [[{{FULLPAGENAME}}/sandbox|sandbox]]
+
--></div><!--
| #default = [{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit}} sandbox] }}<!--end switch--> | [{{fullurl:{{FULLPAGENAME}}/sandbox|action=edit}} sandbox]}}<!--end if sandbox--> and {{#if: {{{testcases|}}} | {{#switch: {{#sub:{{lc:{{{testcases}}}}}|0|1}}
+
--><div style="padding: 1em; padding-bottom: 0; margin: 0;">
| y | t | 1 = [[{{FULLPAGENAME}}/testcases|test case]]
+
{{#if: {{{content|}}}
| #default = [{{fullurl:{{FULLPAGENAME}}/testcases|action=edit}} test case] }}<!--end switch--> | [{{fullurl:{{FULLPAGENAME}}/testcases|action=edit}} test case]}} pages.
+
| {{{content}}}
{{!}}}
+
| {{#ifexist: {{#if: {{{1|}}}
}}<!--end if testcases-->
+
| {{{1}}}
{{#ifeq:{{PAGENAME}}|Documentation (copy)||
+
| {{FULLPAGENAME}}/doc
{{#if:{{{content|}}}|{{{content}}}|
+
}}
{{#if:{{{1|}}}|{{{{{1}}}}}|{{{{FULLPAGENAME}}/doc}}}}
+
| {{tocright}}
}}<!--end if 1-->}}<!--end if content-->}}<!--end ifeq PAGENAME-->
+
{{{{#ifeq: {{NAMESPACE}} | {{ns:Template}}
</includeonly><noinclude>
+
|
{{Documentation|SPW = is not relevant|SPW-link = Documentation (copy)|sandbox=yes|content= This is a version of Template:Documentation customized for Templates Wiki and so not designed to be copied to other wikis.
+
| :{{NAMESPACE:{{#if: {{{1|}}}
+
| {{{1}}}
It acts identically to the usual Template:Documentation - and should be treated identically - except for a few particular cases.
+
| {{FULLPAGENAME}}
* <code>content = </code> should the template have just a short blurb for documentation and not need a new page for it.
+
}}
* <code>sandbox = yes</code> should the template have a /sandbox page.
+
}}:
* <code>testcases = yes</code> should the template have a /testcases page.
+
}}{{
* If the template '''should transclude a documentation page other than its /doc subpage,''' use <code><nowiki>{{Documentation|documentation page}}</nowiki></code>.
+
#if: {{{1|}}}
*: You may also use <code><nowiki>{{Documentation|content=documentation goes here}}</nowiki></code> to include documentation without a subpage at all.
+
| {{PAGENAME:{{{1}}} }}
* If the template '''should be [[Help:Interlanguage links|interlanguage linked]] but at a different name,''' use <code><nowiki>{{Documentation|ja=Japanese name|zh=Chinese name}}</nowiki></code>.
+
| {{PAGENAME}}/doc
*: You might instead create a [[Help:redirect|redirect]] on the foreign-language wiki from the name used on this wiki to theirs (and then update the relevant template in [[#Maintenance]]).
+
}}
*: Interlanguage links to existing Japanese and Chinese pages are automatically inserted if their names are equivalent, in which case no parameter is needed.
+
}}
* SPW
+
| :<strong class="error">This template doesn't have any documentation yet!</strong> <!--
** <code>SPW=is newer than</code> - The template '''exists on [[w:c:starter:|FANDOM starter pages]] but has been upgraded'''.
+
-->Help out by [{{fullurl:{{#if: {{{1|}}}
** <code>SPW=is not relevant</code> - The template (such as this one) are not relevant to wikis other than Templates Wiki.
+
| {{{1}}}
** The other possible relations to SPW - "<code>is not on</code>" and "<code>is on</code>" [and unchanged] are automatically inserted, in which cases no parameter is needed.
+
| {{FULLPAGENAME}}/doc
* <code>dep1=</code><code>dep2=</code><code>dep3=</code><code>dep4=</code> to name up to four dependency templates (include Template: prefix, no need to name /doc pages).
+
}}
== Maintenance ==
+
| action=edit&preload=Template:Documentation/preload
* Periodically check [http://starter.wikia.com/index.php?title=Special%3AAllPages&from=&to=&namespace=10 the list of templates on FANDOM starter pages wiki] to see if the list encoded into [[:Template:Is SPW]] is up-to-date.
+
}} writing some]. <!--
* Periodically check [http://ja.templates.wikia.com/index.php?title=Special%3AAllPages&from=&to=&namespace=10 the list of templates on Japanese Templates Wiki] to see if the list encoded into [[:Template:Is JA]] is up-to-date.
+
-->{{#ifeq: {{NAMESPACE}} | {{ns:10}}
* Periodically check [http://zh.templates.wikia.com/index.php?title=Special%3AAllPages&from=&to=&namespace=10 the list of templates on Chinese Templates Wiki] to see if the list encoded into [[:Template:Is ZH]] is up-to-date.
+
| There may also be documentation on [[w:c:templates:{{#if: {{{1|}}}
}}[[Category:Documentation templates| ]]</noinclude>
+
| {{{1}}}
  +
| {{FULLPAGENAME}}/doc
  +
}}|Wikia Templates]] which can be copied.
  +
}}{{
  +
#ifeq: {{FULLPAGENAME}} | {{ns:Template}}:Documentation/preload
  +
|
  +
| [[Category:Templates without documentation]]
  +
}}
  +
}}
  +
}}<!--
  +
--></div><!--
  +
--><div class="color1" style="clear: both; padding: 0.5em; margin: 0; font-size: 85%; text-align: right;"><!--
  +
-->{{#if: {{{content|}}}
  +
| '''[{{fullurl:{{FULLPAGENAME}}
  +
| action=edit
  +
}} Edit this page]''' to change the above text. ('''[[Template:Documentation|What is this?]]''')
  +
| {{#ifexist: {{#if: {{{1|}}}
  +
| {{{1}}}
  +
| {{FULLPAGENAME}}/doc
  +
}}
  +
| The above text is '''[[m:Transclusion|<span class="color1">transcluded</span>]]''' <!--
  +
-->from '''[[{{#if: {{{1|}}}
  +
| {{{1}}}
  +
| {{FULLPAGENAME}}/doc
  +
}}]]'''; <!--
  +
-->you can '''[{{fullurl:{{#if: {{{1|}}}
  +
| {{{1}}}
  +
| {{FULLPAGENAME}}/doc
  +
}}
  +
| action=edit
  +
}} change it]''' <!--
  +
-->or '''[{{fullurl:{{#if: {{{1|}}}
  +
| {{{1}}}
  +
| {{FULLPAGENAME}}/doc
  +
}}
  +
| action=history
  +
}} view its history]'''. <!--
  +
-->('''[[Template:Documentation|How does this work?]]''')
  +
| This template currently doesn't have any documentation; <!--
  +
-->you can '''[{{fullurl:{{#if: {{{1|}}}
  +
| {{{1}}}
  +
| {{FULLPAGENAME}}/doc
  +
}}
  +
| action=edit&preload=Template:Documentation/preload
  +
}} create it]''' <!--
  +
-->if you know how the template is used. <!--
  +
-->('''[[Template:Documentation|What is this?]]''')
  +
}}
  +
}}<br />If you're done making changes, <!--
  +
-->please '''[{{fullurl:{{FULLPAGENAME}}
  +
| action=purge
  +
}} refresh the text]'''. <!--
  +
-->('''[[Help:Purge|Why?]]''')<br /><!--
  +
-->You can experiment in this template's <!--
  +
-->{{#ifexist: {{#if: {{{sandbox|}}}
  +
| {{{sandbox}}}
  +
| {{FULLPAGENAME}}/sandbox
  +
}}
  +
| '''[[{{#if: {{{sandbox|}}}
  +
| {{{sandbox}}}
  +
| {{FULLPAGENAME}}/sandbox
  +
}}|sandbox]]''' <!--
  +
-->('''[{{fullurl:{{#if: {{{sandbox|}}}
  +
| {{{sandbox}}}
  +
| {{FULLPAGENAME}}/sandbox
  +
}}
  +
| action=edit
  +
}} edit]''' <!--
  +
-->&#124; <!--
  +
-->'''[{{fullurl:Special:ComparePages
  +
| page1={{urlencode:{{FULLPAGENAME}}}}&page2={{urlencode:{{#if: {{{sandbox|}}}
  +
| {{{sandbox}}}
  +
| {{FULLPAGENAME}}/sandbox
  +
}}
  +
}}
  +
}} diff]'''<!--
  +
-->)
  +
| sandbox ('''[{{fullurl:{{#if: {{{sandbox|}}}
  +
| {{{sandbox}}}
  +
| {{FULLPAGENAME}}/sandbox
  +
}}
  +
| action=edit&preload=Template:Documentation/preload-sandbox
  +
}} create]''' <!--
  +
-->&#124; <!--
  +
-->'''[{{fullurl:{{#if: {{{sandbox|}}}
  +
| {{{sandbox}}}
  +
| {{FULLPAGENAME}}/sandbox
  +
}}
  +
| action=edit&preload={{urlencode:{{FULLPAGENAME}}}}&summary={{urlencode:Create sandbox version of [[{{FULLPAGENAME}}]]}}
  +
}} mirror]''' <!--
  +
-->)
  +
}} <!--
  +
-->and {{#ifexist: {{#if: {{{testcases|}}}
  +
| {{{testcases}}}
  +
| {{FULLPAGENAME}}/testcases
  +
}}
  +
| '''[[{{#if: {{{testcases|}}}
  +
| {{{testcases}}}
  +
| {{FULLPAGENAME}}/testcases
  +
}}|testcases]]''' <!--
  +
-->('''[{{fullurl:{{#if: {{{testcases|}}}
  +
| {{{testcases}}}
  +
| {{FULLPAGENAME}}/testcases
  +
}}
  +
| action=edit
  +
}} edit]''')
  +
| testcases ('''[{{fullurl:{{#if: {{{testcases|}}}
  +
| {{{testcases}}}
  +
| {{FULLPAGENAME}}/testcases
  +
}}
  +
| action=edit&preload=Template:Documentation/preload-testcases
  +
}} create]''')
  +
}} <!--
  +
-->pages.<!--
  +
-->{{#if: {{{content|}}}
  +
|
  +
| <br />Please add '''[[Help:Categories|categories]]''' and '''[[Help:Interwiki link|interwikis]]''' to <!--
  +
-->{{#ifexist: {{#if: {{{1|}}}
  +
| {{{1}}}
  +
| {{FULLPAGENAME}}/doc
  +
}}
  +
| '''[[{{#if: {{{1|}}}
  +
| {{{1}}}
  +
| {{FULLPAGENAME}}/doc
  +
}}]]'''
  +
| '''[{{fullurl:{{#if: {{{1|}}}
  +
| {{{1}}}
  +
| {{FULLPAGENAME}}/doc
  +
}}
  +
| action=edit&preload=Template:Documentation/preload
  +
}} {{#if: {{{1|}}}
  +
| {{{1}}}
  +
| {{FULLPAGENAME}}/doc
  +
}}]'''
  +
}}.
  +
}} <!--
  +
-->('''[[Special:PrefixIndex/{{FULLPAGENAME}}/|View all subpages of this page]]'''.)<!--
  +
--></div>
  +
</div>

Latest revision as of 04:36, August 1, 2020

Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]

DescriptionEdit

This template is used to insert descriptions on template pages.

SyntaxEdit

Add <noinclude>{{documentation}}</noinclude> at the end of the template page.

UsageEdit

On the Template pageEdit

This is the normal format when used:

TEMPLATE CODE<includeonly>Any categories to be inserted into articles by the template</includeonly><noinclude>
{{documentation}}</noinclude>

If your template is not a completed div or table, you may need to close the tags just before {{documentation}} is inserted (within the noinclude tags).

A line break right before {{documentation}} can also be useful as it helps prevent the documentation template "running into" previous code.

On the Template/doc pageEdit

Normally, you will want to write something like the following on the documentation page:

==Description==
This template is used to do something.

==Syntax==
Type <code>{{t|templatename}}</code> somewhere.

==Samples==
<code><nowiki>{{templatename|input}}</nowiki></code> 

results in...

{{templatename|input}}

<includeonly>Any categories for the template itself</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

Use any or all of the above description/syntax/sample output sections. You may also want to add "see also" or other sections.

Note that the above example also uses the Template:T and Template:T/piece templates.
The above text is transcluded from Template:Documentation/doc; you can change it or view its history. (How does this work?)
If you're done making changes, please refresh the text. (Why?)
You can experiment in this template's sandbox (create | mirror ) and testcases (create) pages.
Please add categories and interwikis to Template:Documentation/doc. (View all subpages of this page.)
Community content is available under CC-BY-SA unless otherwise noted.