Editing Template:Documentation/doc

Jump to navigation Jump to search
Warning: You are not logged in. Once you make an edit, a temporary account will be created for you. Learn more. Log in or create an account to continue receiving notifications after this account expires, and to access other features.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
{{Documentation/Header}}
==Description==
{{Lua|Documentation}}
This template is used to insert descriptions on template pages.
{{CSS}}
This template is used to insert documentation to template pages.


==Syntax==
==Syntax==
* {{T|Documentation}} will produce the documentation template.
Add <code><nowiki><noinclude></nowiki>{{t|Documentation}}<nowiki></noinclude></nowiki></code> at the end of the template page.
* {{T|Documentation|foo}} will fill in the documentation from the "<code>foo</code>" template.
* {{T|Documentation|p1=content=This template does something}} will fill in the documentation with the content "<code>This template does something</code>." (not recommended except for very, very short documentation)
* {{T|Documentation|p1=heading=Important information}} will replace the default heading with "<code>Important information</code>".
* {{T|Documentation|p1=type=category}} will add the "<code>category Templates</code>" category.


==Template Data==
Add <code><nowiki><noinclude></nowiki>{{t|Documentation|documentation page}}<nowiki></noinclude></nowiki></code> to transclude an alternative page from the /doc subpage.
<templatedata>
 
{
==Usage==
"description": {
 
"en": "This template is used to insert descriptions on template pages."
===On the Template page===
},
This is the normal format when used:
"format": "inline",
 
"params": {
<pre>
"1": {
TEMPLATE CODE
"label": {
<includeonly>Any categories to be inserted into articles by the template</includeonly>
"en": "Custom Documentation Page"
<noinclude>{{Documentation}}</noinclude>
},
</pre>
"description": {
 
"en": "Page containing the documentation"
''If your template is not a completed div or table, you may need to close the tags just before <code><nowiki>{{Documentation}}</nowiki></code> is inserted (within the noinclude tags).''
},
 
"default": "{{FULLPAGENAME}}/doc",
''A line break right before <code><nowiki>{{Documentation}}</nowiki></code> can also be useful as it helps prevent the documentation template "running into" previous code.''
"type": "wiki-page-name"
 
},
===On the documentation page===
"heading": {
The documentation page is usually located on the /doc subpage for a template, but a different page can be specified with the first parameter of the template (see [[#Syntax|Syntax]]).
"label": {
 
"en": "Heading"
Normally, you will want to write something like the following on the documentation page:
},
 
"description": {
<pre>
"en": "Custom heading"
==Description==
},
This template is used to do something.
"default": {
 
"en": "[[File:Template-icon.svg|50px|link=|alt=Documentation icon]] Documentation"
==Syntax==
},
Type <code>{{t|templatename}}</code> somewhere.
"type": "line"
 
},
==Samples==
"preload": {
<code>&lt;nowiki>{{templatename|input}}&lt;/nowiki></code>
"label": {
 
"en": "Preload Page"
results in...
},
 
"description": {
{{templatename|input}}
"en": "The page to preload if the `/doc` subpage doesn't exist."
 
},
<includeonly>Any categories for the template itself</includeonly>
"default": "Template:Documentation/preload",
<noinclude>[[Category:Template documentation]]</noinclude>
"type": "wiki-page-name"
</pre>
},
 
"content": {
Use any or all of the above description/syntax/sample output sections. You may also want to add "see also" or other sections.
"label": {
 
"en": "Content",
Note that the above example also uses the [[Template:T]] template.
"tr": "İçerik"
},
"description": {
"en": "Custom documentation content, prevents transclusion of `/doc` subpage."
},
"type": "content"
},
"type": {
"label": "Type",
"description": "Category to categorize template in.",
"type": "string",
"suggested": true
}
}
}
</templatedata>
Please note that all contributions to Honkai: Nexus Anima Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see Honkai Nexus Anima Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template
Below are commonly used wikitext from MediaWiki:Edittools. Click on any to insert them in the edit box.

Parser Functions:{{#if:||}}
{{#ifeq:|||}}
{{#expr:}}
{{#switch:||#default=}}
{{#replace:||}}
{{#titleparts:}}
{{#tag:|}}





Pages included on this page: