Difference between revisions of "Template:Documentation/doc"

From Pangaea Wiki
Jump to: navigation, search
(Included some overlooked information after reviewing the template a bit.)
m
 
Line 1: Line 1:
 
{{documentation subpage}}
 
{{documentation subpage}}
<includeonly>{{ambox/locked}}</includeonly>
 
 
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 
<!-- 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
 
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

Latest revision as of 17:58, 2 November 2020

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

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>

See also