Difference between revisions of "Template:Documentation/doc"

From Krafties
Jump to navigation Jump to search
m
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Templates]]
+
{{Documentation subpage}}
;Documentation will not automatically be excluded when templates are used
+
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 +
This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation, categories, and interwiki links. It also reduces server resources by circumventing a technical limitation of templates
  
===Redirected Templates===
+
It detects the namespace, so when used on templates, it will say ''"Template Documentation"'' but on other namespaces it will just say ''"Documentation"''.
The following templates redirect here (therefor automatically become this template), but it would be prefered if they would be replaced with <code>{{[[Template:Documentation|Documentation]]}}</code> when editing templates.
+
== Usage ==
#[[Template:Template Explanation]]
+
|heading= (OPTIONAL)
#[[Template:TemplateExplanation]]
+
*<code>heading=</code> you can set a custom title, but if you include this parameter but leave it empty then the title will be removed along with the "edit/view" links.
  
===Using the "help templates" for repeating information===
+
==Documentation subpages==
When multiple templates function identically, then it can be tedious to fill in repeating information. Thats why I have made a few ''help-templates''
+
Here is an example of how a <code>/doc</code> subpage setup should look like to be proper.
*Please add any template specific information before the ''help template''
+
:Categories that should be applied to the template should always go between <code><nowiki><includeonly></nowiki></code> and <code><nowiki></includeonly></nowiki></code> so they will not apply themselves to the documentation.
*Insert the appropriate ''help template'' at the end, '''within''' the Explanation section
+
<pre>
{|class=bluetable style="width:700px"
+
{{Documentation subpage}}
<!-- GENERAL HELP TEMPLATES -->
+
<!-- Categories go at the bottom of this page and interwiki links -->
!colspan=2|Help Templates and info
+
 
|-
+
== Usage ==
|[[Template:Tag/help|Tag/help]] ||General information about [[Template:Tag|Tag]] templates
+
| parameter=
|-
+
 
|[[Template:Table Cell Templates/help|Table Cell Templates/help]] ||General information about [[Template:Table Cell Templates|Table Cell Templates]]
+
== See also ==
|-
+
 
<!-- MULTI-TEMPLATES -->
+
<includeonly>
!colspan=2|Multi-template directions
+
<!-- Categories go here, and interwikis go here -->
|-
+
</includeonly>
|[[Template:Navbox/help|Navbox/help]] || how to use the [[Template:Navbox|Navbox]] templates together
+
</pre>
|-
+
 
|[[Template:LearnSpell/help|LearnSpell/help]] || how to use the [[Template:LearnSpell|LearnSpell]] templates together
+
== See also ==
|}
+
*[[Template:Documentation subpage]]
==See Also==
+
<includeonly>
{{Useful Templates}}
+
<!-- Categories go here, and interwikis go here -->
 +
[[Category:Template Documentation]]
 +
</includeonly>

Latest revision as of 09:26, 8 May 2017

This is a documentation subpage for Template:Documentation.
It contains usage information, categories and other content that is not part of the original template page.

This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation, categories, and interwiki links. It also reduces server resources by circumventing a technical limitation of templates

It detects the namespace, so when used on templates, it will say "Template Documentation" but on other namespaces it will just say "Documentation".

Usage[edit]

|heading= (OPTIONAL)
  • heading= you can set a custom title, but if you include this parameter but leave it empty then the title will be removed along with the "edit/view" links.

Documentation subpages[edit]

Here is an example of how a /doc subpage setup should look like to be proper.

Categories that should be applied to the template should always go between <includeonly> and </includeonly> so they will not apply themselves to the documentation.
{{Documentation subpage}}
<!-- Categories go at the bottom of this page and interwiki links -->

== Usage ==
 | parameter=

== See also ==

<includeonly>
<!-- Categories go here, and interwikis go here -->
</includeonly>

See also[edit]