Template:Documentation/doc: Difference between revisions

top: Add short description
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:
{{Lua|Module:Documentation}}
{{Lua|Module:Documentation}}


The {{tlx|documentation}} template is used to contain the [[WP:TDOC|documented information and instructions]] of a certain template, usually from a /doc subpage. It can also be configured to load the content from other pages or be directly fed by text.
The {{tlx|documentation}} template is used to contain the [[CP:TDOC|documented information and instructions]] of a certain template, usually from a /doc subpage. It can also be configured to load the content from other pages or be directly fed by text.


For detailed instructions on how and when to use this template, see [[Wikipedia:Template documentation]] (shortcut: [[WP:TDOC]]).
For detailed instructions on how and when to use this template, see [[Chabadpedia:Template documentation]] (shortcut: [[CP:TDOC]]).


This template has two parts: the big "documentation box" with the documentation inside alongside a toolbar (the <code>[view][edit][history][purge]</code> links), and the smaller "link box" that shows metadata about the documentation alongside the [[Wikipedia:Template sandbox and test cases|sandbox and testcases]] links.
This template has two parts: the big "documentation box" with the documentation inside alongside a toolbar (the <code>[view][edit][history][purge]</code> links), and the smaller "link box" that shows metadata about the documentation alongside the [[Chabadpedia:Template sandbox and test cases|sandbox and testcases]] links.


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 [[Chabadpedia:Protection policy|protected]], where necessary, while allowing anyone to edit the documentation and categories.


== General syntax ==
== General syntax ==
Line 56: Line 56:
The heading in the documentation box changes depending on namespace. See the below list for the default text in each namespace:
The heading in the documentation box changes depending on namespace. See the below list for the default text in each namespace:


* Template namespace: [[File:Test Template Info-Icon - Version (2).svg|32px|link=[[Wikipedia:Template documentation]]]] '''Template documentation'''
* Template namespace: [[File:Test Template Info-Icon - Version (2).svg|32px|link=[[Chabadpedia:Template documentation]]]] '''Template documentation'''
* Module namespace: [[File:Test Template Info-Icon - Version (2).svg|32px|link=[[Wikipedia:Template documentation]]]] '''Module documentation'''
* Module namespace: [[File:Test Template Info-Icon - Version (2).svg|32px|link=[[Chabadpedia:Template documentation]]]] '''Module documentation'''
* Other namespaces: '''Documentation'''
* Other namespaces: '''Documentation'''


Line 75: Line 75:


== Placement and tags ==
== Placement and tags ==
{{Further information|Wikipedia:Template documentation#Where to place it}}
{{Further information|Chabadpedia:Template documentation#Where to place it}}
This code should be added at the bottom of the template code page, with no space before {{Tag|noinclude|o}} (which causes extra whitespace to show on pages where the template is transcluded):
This code should be added at the bottom of the template code page, with no space before {{Tag|noinclude|o}} (which causes extra whitespace to show on pages where the template is transcluded):


Line 83: Line 83:
</noinclude></syntaxhighlight>
</noinclude></syntaxhighlight>


To automatically insert the above text, you can also use the [[Wikipedia:Substitution|substitution]] code shortcut {{tlxs|doc-code}}.
To automatically insert the above text, you can also use the [[Chabadpedia:Substitution|substitution]] code shortcut {{tlxs|doc-code}}.


=== Categories and interwikis ===
=== Categories and interwikis ===
Depending on where to the documentation is placed, it may be tricky to handle the categories and interwikis. See {{section link|Wikipedia:Template documentation#Categories and interwiki links}} for information about adding these.
Depending on where to the documentation is placed, it may be tricky to handle the categories and interwikis. See {{section link|Chabadpedia:Template documentation#Categories and interwiki links}} for information about adding these.


== Technical details ==
== Technical details ==
Line 119: Line 119:


=== Subject namespaces vs. talk namespaces ===
=== Subject namespaces vs. talk namespaces ===
This template is usually placed in the [[WP:NS#Subject namespaces|subject namespace]]. But in some cases this template needs to be on the [[WP:TALKSPACE|Talk namespace]]:
This template is usually placed in the [[CP:NS#Subject namespaces|subject namespace]]. But in some cases this template needs to be on the [[CP:TALKSPACE|Talk namespace]]:


* In the MediaWiki namespace, since {{tag|noinclude|o}} often does not work in system messages, and since the MediaWiki namespace needs to be kept clean for performance reasons.
* In the MediaWiki namespace, since {{tag|noinclude|o}} often does not work in system messages, and since the MediaWiki namespace needs to be kept clean for performance reasons.
Line 131: Line 131:
=== Color scheme ===
=== Color scheme ===
{| class="wikitable" style="font-size:90%"
{| class="wikitable" style="font-size:90%"
|+ Wikipedia background colors for {{Template link|documentation}} <small>([[Help:Using colors]])</small>
|+ Chabadpedia background colors for {{Template link|documentation}} <small>([[Help:Using colors]])</small>
! !! RGB !! HSV !! Color !! General usage !! Note
! !! RGB !! HSV !! Color !! General usage !! Note
|-
|-
Line 222: Line 222:
==See also==
==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|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|Barnstar documentation}}, a variant of {{tl|Documentation}} for use with [[Chabadpedia:Barnstars|barnstar]] templates.
* {{tl|Navbox documentation}}, a variant of {{tl|Documentation}} for use with [[Wikipedia:Navigation template|navigation templates]].
* {{tl|Navbox documentation}}, a variant of {{tl|Documentation}} for use with [[Chabadpedia:Navigation template|navigation templates]].
* [[Wikipedia:Template documentation]] is a how-to guide to template documentation.
* [[Chabadpedia: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.
* [[Chabadpedia:Template sandbox and test cases]] explains the use of /sandbox and /testcases subpages and includes more information about template testing.


<includeonly><!-- Make sure that only page [[Template:Documentation]] is categorised. No other page (no subpages, not when transcluded).
<includeonly><!-- Make sure that only page [[Template:Documentation]] is categorised. No other page (no subpages, not when transcluded).