Help:Templates: Difference between revisions

Jump to navigation Jump to search
10 bytes added ,  1 December 2023
(→‎Template creation: add a section of directives)
Line 31: Line 31:


=== Formatting ===
=== Formatting ===
* Templates '''must''' have "template data", achieved by clicking "Manage template data" at the top of the page. This enables templates to be used by visual editors.
* Templates {{em|must}} have "template data", achieved by clicking "Manage template data" at the top of the page. This enables templates to be used by visual editors.
** The template data '''must''' be on the template's main page if it does not have a doc subpage. It '''must''' be on the template's doc subpage if it does have one.
** The template data {{em|must}} be on the template's main page if it does not have a doc subpage. It {{em|must}} be on the template's doc subpage if it does have one.
* Templates '''should''' have documentation that includes at least one example of its usage.  
* Templates {{em|should}} have documentation that includes at least one example of its usage.  
* Templates '''should''' use {{c|<nowiki>{{documentation|content=}}</nowiki>}} for all of its documentation.
* Templates {{em|should}} use {{c|<nowiki>{{documentation|content=}}</nowiki>}} for all of its documentation.
** Long documentation '''may''' be moved to a {{c|/doc}} subpage. In this case, use {{c|<nowiki>{{documentation}}</nowiki>}} on the main page instead.
** Long documentation {{em|may}} be moved to a {{c|/doc}} subpage. In this case, use {{c|<nowiki>{{documentation}}</nowiki>}} on the main page instead.
* Templates '''must''' have categories. At the bare minimum, it should be categorized as [[:Category:Templates]] or one of its subcategories.
* Templates {{em|must}} have categories. At the bare minimum, it should be categorized as [[:Category:Templates]] or one of its subcategories.
** The categories '''should''' be located on the doc subpage, if it exists. The doc subpage '''must''' use {{c|<nowiki><noinclude></nowiki>}} tags around categories, otherwise the subpage will be counted as a template in the category index.
** The categories {{em|should}} be located on the doc subpage, if it exists. The doc subpage {{em|must}} use {{c|<nowiki><noinclude></nowiki>}} tags around categories, otherwise the subpage will be counted as a template in the category index.
* Cargo declare '''must''' be in a noinclude on the template's main page, even if there is a doc subpage.
* Cargo declare {{em|must}} be in a noinclude on the template's main page, even if there is a doc subpage.


== Additional resources==
== Additional resources==
8,856
edits

Navigation menu