Template:Documentation

From Ascent
(Difference between revisions)
Jump to: navigation, search
(documentation template for including into template pages)
 
 
Line 4: Line 4:
 
{{{{PAGENAME}}/doc}}</div><br style="clear:both;"/>
 
{{{{PAGENAME}}/doc}}</div><br style="clear:both;"/>
 
<div style="background-color:#F6F6F6; padding:10px">Visit [{{fullurl:{{FULLPAGENAME}}/doc|action=edit}} {{PAGENAME}}/doc] to edit this text. (How to: [[Template:Documentation|document correctly]])</div></div><noinclude></div>
 
<div style="background-color:#F6F6F6; padding:10px">Visit [{{fullurl:{{FULLPAGENAME}}/doc|action=edit}} {{PAGENAME}}/doc] to edit this text. (How to: [[Template:Documentation|document correctly]])</div></div><noinclude></div>
{{documentation}}</noinclude>
+
{{documentation}}[[Category:Templates]]</noinclude>

Latest revision as of 09:13, 24 August 2015

Template documentation (for the template shown above, sometimes hidden or invisible)

[edit] Description

This template is used to insert descriptions on template pages.

[edit] Syntax

Add <noinclude>{{Documentation{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}}}</noinclude> at the end of the template page.

[edit] Usage

[edit] On the Template page

This is the normal format when used:

YOUR TEMPLATE CODE<includeonly>Any categories to be inserted into articles by the template</includeonly><noinclude>
{{Documentation}}</noinclude>

If your template is not a completed div or table, you may need to close the tags just before {{documentation}} is inserted (within the noinclude tags).

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

[edit] On the Template/doc page

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

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

==Syntax==
Type this somewhere.
<pre>{{t|templatename}}

[edit] Example

{{templatename|input}}
Results in...

{{templatename|input}}

<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 other sections.

Note that the above example also uses the Template:T and Template:T/piece templates.

Visit Documentation/doc to edit this text. (How to: document correctly)
Template documentation (for the template shown above, sometimes hidden or invisible)

[edit] Description

This template is used to insert descriptions on template pages.

[edit] Syntax

Add <noinclude>{{Documentation{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}{{#ifeq: ---|---|||<--->}}}}</noinclude> at the end of the template page.

[edit] Usage

[edit] On the Template page

This is the normal format when used:

YOUR TEMPLATE CODE<includeonly>Any categories to be inserted into articles by the template</includeonly><noinclude>
{{Documentation}}</noinclude>

If your template is not a completed div or table, you may need to close the tags just before {{documentation}} is inserted (within the noinclude tags).

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

[edit] On the Template/doc page

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

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

==Syntax==
Type this somewhere.
<pre>{{t|templatename}}

[edit] Example

{{templatename|input}}
Results in...

{{templatename|input}}

<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 other sections.

Note that the above example also uses the Template:T and Template:T/piece templates.

Visit Documentation/doc to edit this text. (How to: document correctly)
Personal tools
Namespaces

Variants
Actions
Navigation
To Begin
Travelling
Trading
Character Skills
Player Built Star Bases
Exploration
Settlements and Colonies
Politics
PVE Combat
Tools