Template:ROOT/Template Documentation/Template Documentation

From Wikibooks, open books for an open world
Jump to navigation Jump to search
This is the documentation for the template Template Documentation designed for the book ROOT. Please embed this documentation on the template's page (or elsewhere) with {{ROOT/Template Documentation/Template Documentation}}. To edit the template documentation, please edit this page.

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.

  1. First we create the template on the page Template:ROOT/MyTemplate
  2. 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].
  3. Important: Put <noinclude></noinclude> tags around the {{ROOT/Template Documentation}} so it won't appear on pages where the documentation is just embedded.
  4. Now we embed the documentation on the template's site via: {{ROOT/Template Documentation}}.
  5. Important: The syntax Template:ROOT/MyTemplate and Template: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>

  1. 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.