Star Trek Online Wiki
Register
Advertisement

To put a template in Category:Formatting templates:

  • Use <noinclude>[[Category:Formatting templates]]</noinclude>. The "<noinclude>" tags are necessary because without them, you end up categorizing all pages using the template in the template category!
  • If your template is meant to be used in-line, make sure that there are no line feeds after </noinclude>. If there are, it may work in flowing text, but it will misbehave in bullet lists. You can have as many line feeds as you like between the noinclude tags though:
<noinclude>[[Category:Formatting templates]]
</noinclude>Text or graphic that is meant to be used in-line
  • Alternatively, if the template has a documentation subpage, you can place the category there inside <includeonly> tags instead. For example:

...Template documentation...
<includeonly>
[[Category:Formatting templates]]

</includeonly>
This is often the preferable approach, because:
  1. There's no danger of accidentally categorizing pages that use the template. Template documentation is automatically wrapped in <noinclude> tags for display on the template page.
  2. Although templates may have to be protected to prevent vandalism or disruption to the wiki (since a template coding error can affect every article that uses the template), template documentation is far less often subject to edit restrictions. Even protected templates can be categorized by any user who's able to edit the template documentation.
  • Remember that a template can be put in multiple categories if it belongs to them all!
  • Or, if this is not quite the right category, go back to Category:Templates and try to find a better suited subcategory.


Advertisement