Help:Categories: Difference between revisions

Line 34: Line 34:
First: do you need to create one? Sometimes a category very similar to the one you are about to create already exists. Search [[Special:Categories]] for similar categories.
First: do you need to create one? Sometimes a category very similar to the one you are about to create already exists. Search [[Special:Categories]] for similar categories.


;If you do not find a similar category or still want to give a page a more specific label :To create a category just type
'''If you do not find a similar category or still want to give a page a more specific label:'''
To create a category just type
 
<pre>
<nowiki>[[</nowiki>Category:Category_name<nowiki>]]</nowiki>
</pre>


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


at the bottom of the wiki page you are editing.
at the bottom of the wiki page you are editing.


;'''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'''''


Once saved, the wiki page will now display your new category like the [[image:Category_banner_example.png‎|image above]].
Once saved, the wiki page will now display your new category like the image example above.


You will also be able to locate your new category under [[Special:Categories]]. In both instances, the link will be in red text.
You will also be able to locate your new category under [[Special:Categories]]. In both instances, the link will be in red text.
Line 56: Line 63:
A red category link indicates that its page has not been created. A blue category link indicates that a page for that category exists.  
A red category link indicates that its page has not been created. A blue category link indicates that a page for that category exists.  


==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]]<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>.
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.


=How to Add an Existing Category=
=How to Add an Existing Category=
Confirmed users, Bureaucrats and Sysops emeriti
176

edits