Thank you for visiting SotAwiki, a Shroud of the Avatar Wiki Encyclopedia. If you see any information that is outdated, please take the time to update it, or if you prefer, leave a message for other editors. This community wiki is for the benefit of all Avatars!

Template:Documentation/doc: Difference between revisions

From SotA Wiki
Jump to navigation Jump to search
Fenyx4 (talk | contribs)
Created page with ";Description :This template is used to insert descriptions on template pages. ;Syntax :Type <code><nowiki><noinclude></nowiki>{{t|documentation}}<nowiki></noinclude></nowiki><..."
 
Alianin (talk | contribs)
m Changed category.
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
;Description
{{tocright}}
:This template is used to insert descriptions on template pages.
== Purpose ==
;Syntax
This template is used to insert descriptions on template pages.
:Type <code><nowiki><noinclude></nowiki>{{t|documentation}}<nowiki></noinclude></nowiki></code> at the end of the template page.


==General usage==
==Usage==
===On the Template page===
===On the Template page===
<pre>
<pre>
Template code<includeonly>Any categories to be inserted into articles by the template</includeonly><noinclude>
<includeonly> Template code... Any categories to be inserted into articles by the template..</includeonly><noinclude> Template's categories.. {{documentation}}
{{documentation}}</noinclude>
</noinclude>
</pre>
</pre>


Line 17: Line 16:
===On the Template/doc page===
===On the Template/doc page===
<pre>
<pre>
;Description
== Purpose ==
:This template is used to do something.
This template is used to do something.
;Syntax
:Type <code>{{t|templatename}}</code> somewhere.
;Sample output
:<code>&lt;nowiki>{{templatename|foo}}&lt;/nowiki></code> gives...
:{{templatename|foo}}


<includeonly>Any categories for the template itself</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
== Usage ==
<pre>{{templatename|template parameters}}</pr e>
 
== Parameters ==
{| class="sotawikitable"
! Parameter
! Explanation
|-
| firstparameter
| Description of the first parameter
|-
| ...
| ...
...
|}
 
== Example ==
<pre>{{templatename|template parameters}}</pr e>
{{templatename|template parameters}}
 
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
</pre>
</pre>


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.
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 the [[Template:T]] and [[Template:T/piece]] templates.


<noinclude>[[Category:Template Documentation|{{PAGENAME}}]]</noinclude>
== Parameters ==
{| class="sotawikitable"
! Parameter
! Explanation
|-
| 1 ''(optional)''
| The name of template whose documentation will be displayed.
|}
 
 
== Example ==
{| style="background:transparent; border:none;" width=100%
| valign="top" |
<pre>{{documentation}}</pre>
|-
| valign="top" |
<pre>{{documentation|Infobox Location}}</pre>
|}
 
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

Latest revision as of 21:22, 17 July 2014

Purpose[edit]

This template is used to insert descriptions on template pages.

Usage[edit]

On the Template page[edit]

<includeonly> Template code... Any categories to be inserted into articles by the template..</includeonly><noinclude> Template's categories.. {{documentation}}
</noinclude>

Note that, depending on the template, you may need to add a clear or complete a table/div just before {{documentation}} is inserted (within the noinclude tags).

The line break is also useful as it helps prevent the documentation template "running into" previous code.

On the Template/doc page[edit]

== Purpose ==
This template is used to do something.

== Usage ==
<pre>{{templatename|template parameters}}</pr e>

== Parameters ==
{| class="sotawikitable"
! Parameter
! Explanation
|-
| firstparameter
| Description of the first parameter
|-
| ...
| ...
...
|}

== Example ==
<pre>{{templatename|template parameters}}</pr e>
{{templatename|template parameters}}

<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</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.


Parameters[edit]

Parameter Explanation
1 (optional) The name of template whose documentation will be displayed.


Example[edit]

{{documentation}}
{{documentation|Infobox Location}}