Template:Documentation/doc: Difference between revisions

m
Sarkarversify
m (1 revision)
 
m (Sarkarversify)
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:


This is the {{tl|Documentation}} template.
This is the {{tl|Documentation}} template.
For most of the instructions about how and when to use this template, see [[Wikipedia:Template documentation]].


This template displays a green doc 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 displays a green doc 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 [[Wikipedia:Transclusion|transcluded]] onto other pages. It can be used in the [[Wikipedia:Template namespace|template namespace]] and most other [[Wikipedia:Namespace|namespace]]s.
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 [[Wikipedia:Protection policy|protected]] where necessary, while allowing anyone to edit the documentation and categories.
Use of this template allows templates to be protected where necessary, while allowing anyone to edit the documentation and categories.


===Usage===
===Usage===
Line 63: Line 61:
The code should be added at the bottom of the template code, with no space before {{Tag|noinclude|o}} (which would cause extra space on pages where the template is used).
The code should be added at the bottom of the template code, with no space before {{Tag|noinclude|o}} (which would cause extra space on pages where the template is used).


Categories that apply to the template itself should be added to the bottom of the /doc subpage, inside {{Tag|includeonly}} tags.  Interwiki links that apply to the template should be listed at [[d:|Wikidata]] (more at [[Wikipedia:Wikidata|Wikidata]]).  For more complex cases, see [[Wikipedia:Template documentation#Categories and interwiki links]].
Categories that apply to the template itself should be added to the bottom of the /doc subpage, inside {{Tag|includeonly}} tags.  Interwiki links that apply to the template should be listed at d:|Wikidata.


If the documentation page contains {{tag|includeonly|o}} or {{tag|noinclude|o}} tags as part of the visible documentation text, replace the "<code>&lt;</code>" with "<code>&amp;lt;</code>".
If the documentation page contains {{tag|includeonly|o}} or {{tag|noinclude|o}} tags as part of the visible documentation text, replace the "<code>&lt;</code>" with "<code>&amp;lt;</code>".
Line 71: Line 69:
:[[File:Template-info.png|32px]] '''Template documentation'''
:[[File:Template-info.png|32px]] '''Template documentation'''


In most other namespaces, such as "Wikipedia:", it shows this heading:
In most other namespaces, such as "Sarkarverse:", it shows this heading:
:'''Documentation'''
:'''Documentation'''


Line 139: Line 137:
}}
}}
</pre>
</pre>
===See also===
* {{tl|Documentation subpage}}, a notice placed at the top of a /doc subpage explaining its role and including a link to the page it documents.
* {{tl|Barnstar documentation}}, a variant of {{tl|Documentation}} for use with [[Wikipedia:Barnstars|barnstar]] templates.
* {{tl|Documentation/color scheme}} presents the color scheme used by {{tl|Documentation}}.
* [[Wikipedia:Template documentation]] is a how-to guide to template documentation.
* [[Wikipedia:Template sandbox and test cases]] explains the use of /sandbox and /testcases subpages and includes more information about template testing.
* [[User:Technical 13/Scripts/editTemplateNoDoc.js]], a beta script that enables documentation to be hidden by default when editing templates.


<includeonly>{{When pagename is |/sandbox= |/testcases= |other=
<includeonly>{{When pagename is |/sandbox= |/testcases= |other=