Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
DOORS Site Logo

Welcome to the Official DOORS Wiki!
Please read the Wiki Rules the Manual of Style and familiarise yourself with our Wiki Policies before contributing to get a better understanding of what content is allowed on our wiki and how to display it properly, if you need help don't hesitate to reach out to a DOORS Wiki Staff Member.

Editing Template:Documentation/doc

Template page
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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:
==Description==
<noinclude>{{Documentation subpage}}</noinclude>
This template is used to insert descriptions on template pages.
; Description

: This template is used to insert documentation on template pages.
; Syntax
==Syntax==
: Type <code>&lt;noinclude>{{T|Documentation}}&lt;/noinclude></code> at the end of the template page.
Add <code><nowiki><noinclude></nowiki>{{t|Documentation}}<nowiki></noinclude></nowiki></code> at the end of the template page.

Add <code><nowiki><noinclude></nowiki>{{t|Documentation|documentation page}}<nowiki></noinclude></nowiki></code> to transclude an alternative page from the /doc subpage.

==Usage==

===On the Template page===
This is the normal format when used:


== General usage ==
=== On the Template page ===
<pre>
<pre>
TEMPLATE CODE
Template code<noinclude>
<includeonly>Any categories to be inserted into articles by the template</includeonly>
{{Documentation}}
</noinclude>
<noinclude>{{Documentation}}</noinclude>
</pre>
</pre>


''If your template is not a completed div or table, you may need to close the tags just before <code><nowiki>{{Documentation}}</nowiki></code> is inserted (within the noinclude tags).''
=== On the Template/doc page ===

''A line break right before <code><nowiki>{{Documentation}}</nowiki></code> can also be useful as it helps prevent the documentation template "running into" previous code.''

===On the documentation page===
The documentation page is usually located on the /doc subpage for a template, but a different page can be specified with the first parameter of the template (see [[#Syntax|Syntax]]).

Normally, you will want to write something like the following on the documentation page:

<pre>
<pre>
; Description
==Description==
: This template is used to do something.
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>&lt;nowiki>{{Templatename|foo}}</nowiki></code> gives...
: {{Templatename|foo}}


==Syntax==
<includeonly>Any categories for the template itself
Type <code>{{t|templatename}}</code> somewhere.
</includeonly><noinclude>
[[Category:Template documentation]]
</noinclude>
</pre>


==Samples==
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.
<code>&lt;nowiki>{{templatename|input}}&lt;/nowiki></code>

results in...

{{templatename|input}}

<includeonly>Any categories for the template itself</includeonly>
<noinclude>[[Category:Template documentation]]</noinclude>
</pre>


Use any or all of the above description/syntax/sample output sections. You may also want to add "see also" or other sections.
Note that the above example also uses {{T|T}}.


Note that the above example also uses the [[Template:T]] template.
== Dependencies ==
; Templates
: [[Template:Tocright]] ([[Template:Tocright/doc]])


<includeonly>[[Category:Documentation templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
== TemplateData ==
<templatedata>
{
"params": {
"1": {
"description": "The name of the custom /doc subpage.",
"example": "Template:Documentation/doc",
"default": "{{FULLPAGENAME}}/doc",
"label": "Custom Documentation Location",
"type": "string"
},
"content": {
"description": "Content if documentation page will not be transcluded",
"example": "This template creates quotes.",
"label": "Inline Documentation Content",
"type": "string"
},
"sandbox": {
"label": "Custom Sandbox Location",
"description": "Specifies the /sandbox subpage location",
"example": "Template:Example/sandbox",
"type": "string",
"default": "{{FULLPAGENAME}}/sandbox"
},
"heading": {
"label": "Heading text",
"description": "Changes the default \"Documentation\" header to a different one",
"example": "About this template",
"type": "string"
},
"footer": {
"label": "Custom footer content",
"description": "Replaces the default link box with a custom one",
"example": "Documentation is automatically generated by {{T|Ambox}}. Its contents are shown here.",
"type": "unbalanced-wikitext"
}
},
"description": "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."
}
</templatedata><includeonly>[[Category:Documentation templates| ]]</includeonly>
Please note that all contributions to DOORS Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see DOORS Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Below are some commonly used wiki markup codes. Simply click on what you want to use and it will appear in the edit box above.

View this template