![]() |
This template page is under construction. Contact kentsmith9 if you have questions. |
Template namespace
(Information to be added.)
Learning about templates
(Information to be added.)
Transclusion overview
(Information to be added.)
Documentation subpages
When creating any template, a documentation subpage should be part of the template. Place this code at the very end of the template. Because templates are generally transcluded into other pages, it is important not to add unnecessary line breaks. Therefore the initial <noinclude>
should fall immediately after the last character of the template page, not on the next line below it.
<noinclude> {{Documentation}} </noinclude>
Once this page is initially added to a template, it will place an empty template documentation box and a red link to the documentation subpage indicating the doc subpage is not yet created. This initial link will automatically enter the template into the category indicating the template documentation is missing.
Once some or all the documentation is added, the category can be changed to reflect the appropriate documentation category if more edits are required, or removed completely since the documentation no longer needs attention.
Adding categories
When adding categories to pages, it is important to differentiate between adding a template to a category or adding the page on which a template is used to a category. In other words, a template that displays a box on a page saying the page is under construction should also add a category onto the page to include it in a category tracking pages under construction. Separately, the template itself should be placed in a category for tracking message templates. Where and how the category link is placed on the page will determine if the page or the template is marked and for what it is marked.
When templates are properly created with a documentation subpage, the category tracking the template itself is put on that document subpage. If a template was originally created without a document subpage, the category may be seen on the template page itself inside noinclude instructions. If that is the case, that code should be removed and the category should be moved to the documentation subpage.
<includeonly><!-- These categories get added only to the template page that transcludes this doc page --> [[Category:Template Management]] [[Category:Expand Template Documentation]] </includeonly>