Help:Categories: Difference between revisions

Line 39: Line 39:


<pre>
<pre>
<nowiki>[[</nowiki>Category:Category_name<nowiki>]]</nowiki>
'''<nowiki>[[</nowiki>Category:Category_name<nowiki>]]</nowiki>'''
</pre>  
</pre>  


Line 45: Line 45:


<pre>
<pre>
<nowiki>[[</nowiki>Category:Category_Name<nowiki>]]</nowiki>
'''<nowiki>[[</nowiki>Category:Category_Name<nowiki>]]</nowiki>'''
</pre>  
</pre>  


Line 51: Line 51:




;'''Please, do not create categories like this''' <pre>'''<nowiki>[[</nowiki>Category:Category/Name<nowiki>]]</nowiki>'''</pre>
;'''Please, do not create categories like this''' <pre><nowiki>[[</nowiki>Category:Category/Name<nowiki>]]</nowiki></pre>


;'''Please, do not create categories like this''' <pre>'''<nowiki>[[</nowiki>Category:Category:Name<nowiki>]]</nowiki>'''</pre>
;'''Please, do not create categories like this''' <pre><nowiki>[[</nowiki>Category:Category:Name<nowiki>]]</nowiki></pre>


;'''Please, do not create categories like this''' <pre>'''<nowiki>[[</nowiki>Category:Category:LongerName<nowiki>]]</nowiki>'''</pre>
;'''Please, do not create categories like this''' <pre><nowiki>[[</nowiki>Category:Category:LongerName<nowiki>]]</nowiki></pre>


'''''Category names that are incorrect will be changed to the appropriate format'''''
'''''Category names that are incorrect will be changed to the appropriate format'''''
Line 67: Line 67:
==How to Define a Category Page==
==How to Define a Category Page==


Categories are most powerful when included within templates. Let's look at the Spam template as an example. When a page is flagged with the spam template <nowiki>{{</nowiki>[[Template:Spam]]<nowiki>}}</nowiki>, that page is automatically filed in the Spam category because it is written within the template. When you create a template, include the category within the <nowiki><includeonly></nowiki> tags <nowiki>[[</nowiki>Category:Category_name<nowiki>]]</nowiki>.
Categories are most powerful when included within templates. Let's look at the Spam template as an example. When a page is flagged with the spam template <nowiki>{{</nowiki>[[Template:Spam|Spam]]<nowiki>}}</nowiki>, that page is automatically filed in the [[Category:Spam|Spam category]] because it is declared within the template.  
 
When you create a template, include the category within the <nowiki><includeonly></nowiki> tags <nowiki>[[</nowiki>Category:Category_name<nowiki>]]</nowiki>.
If you want to add another category or a category that doesn't need a template just add </nowiki>[[Category:Category_name]]</nowiki> to the page.  
If you want to add another category or a category that doesn't need a template just add </nowiki>[[Category:Category_name]]</nowiki> to the page.  
In both instances, a Category page will be generated. Search for it and save it. Describe the category and its function.
In both instances, a Category page will be generated. Search for it and save it. Describe the category and its function.
Confirmed users, Bureaucrats and Sysops emeriti
176

edits