Template:Documentation/doc
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
Simply add the {{Documentation}}
to the bottom of the page and save. If the page has /doc
subpage, then it will automatically fill the documentation, else it will give you a easy red link that begs to be created.
Optional parameters
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.heading-style=
lets you set custom style to the heading, such as the font-size.
Namespace detection
This template has the neat feature of detecting the namespace and applying the appropriate heading accordingly.
-
Tempalte:
namespaces will get the fancy Template documentation with navbar links to the/doc
subpage. -
File:
namespaces will get Summary heading and hides the info-panel at the bottom. Neat for when you really want to add information to a specific file.
Any other namespace will default to a simple Documentation as heading unless you use the optional heading
parameter.
Documentation subpages
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>