m (Closing classes.) |
(Updated formatting.) |
||
Line 13: | Line 13: | ||
- Only shows if the subpage is a sandbox |
- Only shows if the subpage is a sandbox |
||
--> |
--> |
||
{{#ifeq: {{ |
{{#ifeq: {{SUBPAGENAME}} | sandbox |
||
| <div class="article-table" |
| <div class="article-table" |
||
style="padding:1.5em; margin:auto; border:1px solid #5556; border-bottom:1px solid #5556; width:75%; display:flex"> |
style="padding:1.5em; margin:auto; border:1px solid #5556; border-bottom:1px solid #5556; width:75%; display:flex"> |
||
Line 21: | Line 21: | ||
<div> |
<div> |
||
: This is a template sandbox subpage for [[{{NAMESPACE}}:{{BASEPAGENAME}}]]. |
: This is a template sandbox subpage for [[{{NAMESPACE}}:{{BASEPAGENAME}}]]. |
||
:{{#ifexist: {{{testcases|{{{page|{{#ifeq: {{SUBPAGENAME}}|sandbox|{{NAMESPACE}}:{{ |
:{{#ifexist: {{{testcases|{{{page|{{#ifeq: {{SUBPAGENAME}}|sandbox|{{NAMESPACE}}:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}}}}/testcases}}} |
||
| See also the companion subpage for [[{{NAMESPACE}}:{{ |
| See also the companion subpage for [[{{NAMESPACE}}:{{BASEPAGENAME}}/testcases|the testcases]]. |
||
}} |
}} |
||
</div> |
</div> |
||
Line 43: | Line 43: | ||
| {{ns:Template}} | {{ns:Module}} = |
| {{ns:Template}} | {{ns:Module}} = |
||
[[File:{{#if: {{{content|}}} | Documentation_icon |
[[File:{{#if: {{{content|}}} | Documentation_icon |
||
| {{#ifexist: {{{1|{{{page|{{#ifeq: {{SUBPAGENAME}}|sandbox|{{NAMESPACE}}:{{ |
| {{#ifexist: {{{1|{{{page|{{#ifeq: {{SUBPAGENAME}}|sandbox|{{NAMESPACE}}:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}}}}/doc}}} |
||
| Documentation_icon |
| Documentation_icon |
||
| No Documentation_icon |
| No Documentation_icon |
||
Line 109: | Line 109: | ||
| {{{page|}}} |
| {{{page|}}} |
||
| {{#ifeq: {{SUBPAGENAME}} | sandbox |
| {{#ifeq: {{SUBPAGENAME}} | sandbox |
||
| {{NAMESPACE}}:{{ |
| {{NAMESPACE}}:{{BASEPAGENAME}} |
||
| {{ |
| {{FULLPAGENAME}} |
||
}} |
}} |
||
}}/doc |
}}/doc |
||
Line 290: | Line 290: | ||
| <!-- No text; we don't know where to put the category (in the {1}? inline?)--> |
| <!-- No text; we don't know where to put the category (in the {1}? inline?)--> |
||
| {{#ifexist: {{{page|{{#ifeq: {{SUBPAGENAME}}|sandbox|{{NAMESPACE}}:{{ |
| {{#ifexist: {{{page|{{#ifeq: {{SUBPAGENAME}}|sandbox|{{NAMESPACE}}:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}}}}/doc |
||
| Add [[w:Help:Category|categories]] and [[w:Help:Interwiki link|interwikis]] to the <!-- |
| Add [[w:Help:Category|categories]] and [[w:Help:Interwiki link|interwikis]] to the <!-- |
||
-->[[{{{page|{{#ifeq: {{SUBPAGENAME}}|sandbox|{{NAMESPACE}}:{{ |
-->[[{{{page|{{#ifeq: {{SUBPAGENAME}}|sandbox|{{NAMESPACE}}:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}}}}/doc|/doc]]<!-- |
||
--> subpage. |
--> subpage. |
||
| |
| |
||
}} |
}} |
||
}} [[Special:PrefixIndex/{{{page|{{#ifeq: {{SUBPAGENAME}}|sandbox|{{NAMESPACE}}:{{ |
}} [[Special:PrefixIndex/{{{page|{{#ifeq: {{SUBPAGENAME}}|sandbox|{{NAMESPACE}}:{{BASEPAGENAME}}|{{FULLPAGENAME}}}}}}}|Subpages of {{#ifeq: {{SUBPAGENAME}} | sandbox | the base | this }} {{#switch: {{NAMESPACE}}|{{ns:Module}} = module |{{ns:Template}} = template |#default = page }}]].<!-- |
||
-->}}<!-- end if footer |
-->}}<!-- end if footer |
||
--></div>}} |
--></div>}} |
Revision as of 03:55, 8 October 2022
- Description
- This template is used to insert documentation on template pages.
- Syntax
- Type
<noinclude>
at the end of the template page.{{Documentation}}
</noinclude>
General usage
On the Template page
Template code<noinclude> {{Documentation}} </noinclude>
On the Template/doc page
; Description : This template is used to do something. ; Dependencies: :* Uses (some CSS, JS, file, or other template). ; Syntax : Type <code>{{T|Templatename}}</code> somewhere. ; Sample output : <code><nowiki>{{Templatename|foo}}</nowiki></code> gives... : {{Templatename|foo}} <includeonly>Any categories for the template itself </includeonly><noinclude> [[Category:Template documentation]] </noinclude>
Use any or all of the above description/syntax/sample output sections. You may also want to add "see also" or further usage information sections.
Note that the above example also uses {{T}}
.
Dependencies
- Templates
- Template:Tocright (Template:Tocright/doc)
TemplateData
This template is used to display documentation on template pages. It also adds some tools to help the editor to modify the /doc subpage and the template.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Custom Documentation Location | 1 | The name of the custom /doc subpage.
| String | optional |
Inline Documentation Content | content | Content if documentation page will not be transcluded
| String | optional |
Custom Sandbox Location | sandbox | Specifies the /sandbox subpage location
| String | optional |
Heading text | heading | Changes the default "Documentation" header to a different one
| String | optional |
Custom footer content | footer | Replaces the default link box with a custom one
| Unbalanced wikitext | optional |
Editors can experiment in this template's sandbox (create | mirror) page.
Add categories and interwikis to the /doc subpage. Subpages of this template.