Wiki Template Documentation: Difference between revisions

From Drunkapedia
Jump to: navigation, search
imported>Tlosk
(Created page with '{{RightToC}} Documentation for templates should be stored on a subpage of the format "Template Name/Doc". Segregating documentation to a subpage means that updates to the docume…')
 
imported>Arkalor's Bot
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{RightToC}}
{{RightToC}}
Documentation for templates should be stored on a subpage of the format "Template Name/Doc".
{{Related|Page Templates|Wiki Templates|{{mtl|Documentation}}}}


Segregating documentation to a subpage means that updates to the documentation don't cause large numbers of pointless template updates across the wiki, and the template itself can be protected if necessary (without protecting the documentation). That is, each time a change is made to a template, all pages that use that template are updated, which can be significant for widely used templates. Similarly, when changes are needed to a widely used template, experiment first on {{tl|Sandbox}} so only a single change will be needed to the template itself.
Segregating documentation to a subpage means that updates to the documentation don't cause large numbers of pointless template updates across the wiki, and the template itself can be protected if necessary (without protecting the documentation). That is, each time a change is made to a template, all pages that use that template are updated, which can be significant for widely used templates. Similarly, when changes are needed to a widely used template, experiment first on {{tl|Sandbox}} so only a single change will be needed to the template itself.
* Documentation for templates should be stored on a subpage of the format "Template Name/Doc".
* Refer to the documentation by placing <code><nowiki><noinclude>{{Documentation}}</noinclude></nowiki></code> at the bottom of the template page.
* Under "Syntax" include examples that are copy/paste friendly using the pre tag of the template syntax.  
* Under "Syntax" include examples that are copy/paste friendly using the pre tag of the template syntax.  
* Under "Usage" include information about where the template should be used and any special parameter information. If appropriate, provide examples to make usage as clear as possible.
* Under "Usage" include information about where the template should be used and any special parameter information. If appropriate, provide examples to make usage as clear as possible.
Line 23: Line 25:
See [[??]] for an example of template documentation.
See [[??]] for an example of template documentation.


[[Category:Page Template]]
[[Category:Page Templates]]

Latest revision as of 21:14, 8 April 2014

Related topics: Page Templates, Wiki Templates, {{Documentation}}

Segregating documentation to a subpage means that updates to the documentation don't cause large numbers of pointless template updates across the wiki, and the template itself can be protected if necessary (without protecting the documentation). That is, each time a change is made to a template, all pages that use that template are updated, which can be significant for widely used templates. Similarly, when changes are needed to a widely used template, experiment first on {{Sandbox}} so only a single change will be needed to the template itself.

  • Documentation for templates should be stored on a subpage of the format "Template Name/Doc".
  • Refer to the documentation by placing <noinclude>{{Documentation}}</noinclude> at the bottom of the template page.
  • Under "Syntax" include examples that are copy/paste friendly using the pre tag of the template syntax.
  • Under "Usage" include information about where the template should be used and any special parameter information. If appropriate, provide examples to make usage as clear as possible.


Wiki Code

{{Related|Wiki Templates|Wiki Template Documentation}}
== Syntax ==


== Usage ==


<noinclude>[[Category:Template Documentation]]</noinclude>

Example

See ?? for an example of template documentation.