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: | ||
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. | |||
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 == | ||
<pre> | |||
<noinclude>{{Documentation}}</noinclude> | |||
</pre> | |||
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 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: | |||
<pre> | |||
<noinclude>{{Documentation|Other page}}</noinclude> | |||
</pre> | |||
The template | The template transcludes now the content from ''Other page''. | ||
Categories and interwiki links that apply to the template itself should be added to the documentation page, inside <code><includeonly> </includeonly></code> tags. | |||
<includeonly></ | |||
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 | |||
<includeonly>[[Category:Documentation | <includeonly>[[Category:Template Documentation| ]]</includeonly><noinclude>[[Category:Template Documentation]]</noinclude> |