Template:Documentation: Difference between revisions
m 1 revision imported: may be useful |
Adding the updated documentation invoke template. Tags: Replaced Manual revert |
||
Line 1: | Line 1: | ||
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> |
|||
<includeonly>__NOEDITSECTION__ |
|||
<!-- Add categories to the /doc subpage --> |
|||
<div class="sjabdocnote" style="color:grey; text-align:center; margin-top:1em;"><small>'''The template description below will not be displayed when the template is placed.'''</small></div> |
|||
</noinclude> |
|||
<div class="toccolours template-documentation" style="background: #FFFFEE; border: 1px solid #FFDAB9;font-size:100%;">'''Template''': {{navbar|{{PAGENAME}}|mini=1}} ─ '''Template/doc''': {{navbar|{{PAGENAME}}/doc|mini=1}}</div> |
|||
<div class="toccolours template-documentation" style="background: #FFFFEE; border: 1px solid #FFDAB9;font-size:100%;"> |
|||
{{#if:{{{1|{{{content|}}}}}} |{{{1|{{{content}}}}}} |{{/doc}}}} |
|||
</div></includeonly><noinclude>{{documentation|1= |
|||
;Goal |
|||
This template can be used to add information about the purpose and use of a template. It also serves to create a separation between a template and the information about use that is not included when a template is placed. |
|||
;Usage |
|||
The template can be used with two parameters and must be put between <noinclude></noinclude>. |
|||
<pre><nowiki><noinclude>{{</nowiki>documentation|1= |
|||
Explanation of purpose and use of the template |
|||
<nowiki>}} |
|||
</noinclude></nowiki></pre> |
|||
<pre><nowiki><noinclude>{{</nowiki>documentation|content= |
|||
Explanation of purpose and use of the template |
|||
<nowiki>}} |
|||
</noinclude></nowiki></pre> |
|||
;It is suggested to always use the following parts in the template information: |
|||
*Goal |
|||
*Usage |
|||
;And if applicable: |
|||
*Default values |
|||
*Related templates |
|||
For clarity, headings are best preceded by a semicolon (;). |
|||
}}[[Category:Documentation templates]]</noinclude> |
Latest revision as of 03:38, 11 April 2025
![]() | This template uses Lua: |
This is the {{Documentation}} template, used on almost every template page to contain that template's documented instructions and information.
For detailed instructions on how and when to use this template, see w:Wikipedia:Template documentation.
This template displays a green documentation box like you are seeing now and automatically loads the content from a /doc subpage. It can also load the content from other places if instructed to.
This template is intended for documenting templates and other pages that are transcluded onto other pages. It can be used in the template namespace and most other namespaces.
Use of this template allows templates to be protected where necessary, while allowing anyone to edit the documentation and categories.