Template:Documentation/doc: Difference between revisions
Abhishek.it (talk | contribs) m 1 revision imported |
No edit summary |
||
| Line 8: | Line 8: | ||
{{Lua|Module:Documentation}} | {{Lua|Module:Documentation}} | ||
The {{tlx|documentation}} template is used to contain the [[ | 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 [[ | 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 [[ | 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 [[ | 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=[[ | * 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=[[ | * 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| | {{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 [[ | 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| | 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 [[ | 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%" | ||
|+ | |+ 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 [[ | * {{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 [[ | * {{tl|Navbox documentation}}, a variant of {{tl|Documentation}} for use with [[Chabadpedia:Navigation template|navigation templates]]. | ||
* [[ | * [[Chabadpedia:Template documentation]] is a how-to guide to template documentation. | ||
* [[ | * [[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). | ||