Editing Template:Documentation/doc

Template page
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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}}
This template automatically displays a documentation box like you are seeing now, of which the content is transcluded from another page (usually PAGENAME/doc). It is intended for pages which are transcluded in other pages, i.e. templates, whether in the template namespace or not.
The '''documentation''' template is transcluded in the template/module documentation. This template should only be used on subpages titled "doc".  
 
Use this template only if the template page you're using it on has a documentation at ''Template:TEMPLATENAME/doc''. If not, create this page before you proceed.


== Usage ==
== Usage ==
Place {{T|Documentation}} at the top of the documentation page.
<pre>
<noinclude>{{Documentation}}</noinclude>
</pre>
 
This code should be added at the bottom of the template code, with no extra space before "<code>&lt;noinclude></code>" (which would cause extra space on pages where the template is used).
 
The template usually transcludes content from PAGENAME/doc. If you want to transclude content from a different page, specify its pagetitle behind a <code>|</code>, like this:


If the page to be documented is a subpage, use {{T|Documentation|pagename of page to be documented}} at the top of the documentation page. For example, Template:Foo/bar's documentation page would use {{T|Documentation|Template:Foo/bar}}.
<pre>
<noinclude>{{Documentation|Other page}}</noinclude>
</pre>


The template will attempt to auto detect and link <code><nowiki>{{#Invoke:}}</nowiki></code> calls on template documentations or the <code>require()</code>/<code>mw.loadData()</code> depedency list on module documentations. If you want to supress the auto generated dependency list, use {{T|Documentation|DependencyList=no}}
The template transcludes now the content from ''Other page''.


== Note ==
Categories and interwiki links that apply to the template itself should be added to the documentation page, inside <code>&lt;includeonly> &lt;/includeonly></code> tags.
This template links to a /doc that may appear useless, however, it exists in order to link navboxes and userboxes to their base template's documentation.
<includeonly></includeonly>


== TemplateData ==
If you add a sandbox or testcases at ''Template:TEMPLATENAME/sandbox'' and ''Template:TEMPLATENAME/testcases'', links to these pages will be displayed automatically at the top of the documentation box
<templatedata>
{
"params": {},
"description": "The documentation template is transcluded in the template/module documentation. This template should only be used on subpages titled \"doc\"."
}
</templatedata>


<includeonly>[[Category:Documentation Templates]]</includeonly><noinclude>[[Category:Template Documentation]]</noinclude>
<includeonly>[[Category:Template Documentation| ]]</includeonly><noinclude>[[Category:Template Documentation]]</noinclude>
Please note that all contributions to The r/place Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see PlaceWiki: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!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.