Template:ROOT/Template Documentation
Appearance
This is a template designed for the book ROOT. It should be used to mark template documentation sites.
Usage
[edit source]Syntax
[edit source]{{ROOT/Template Documentation}}
How to document a template for the book ROOT
[edit source]Say we want a template MyTemplate
.
- First we create the template on the page
Template:ROOT/MyTemplate
- Next we create an other template on the page
Template:ROOT/Template Documentation/MyTemplate
. On this page we put the documentation and embed this box[1]. - Important: Put
<noinclude></noinclude>
tags around the {{ROOT/Template Documentation}} so it won't appear on pages where the documentation is just embedded. - Now we embed the documentation on the template's site via:
{{ROOT/Template Documentation}}
. - Important: The syntax
Template:ROOT/MyTemplate
andTemplate:ROOT/Template Documentation/MyTemplate
must be strictly followed or the thing won't work.
Example
[edit source]Since this template analyzes the page information, an example can't be given. Check out the source of the template's own documentation site for an example if really needed.
Notes
[edit source]<references>
- ↑ From a technical point of view, the documentation is of course a template again. But it would become an awkward loop to document it again. Since a documentation template never takes any parameters and has an obvious purpose, it should be absolutely clear how to use it even without documentation.