Help:Category: Difference between revisions

From Wikipedia of the Dark Brotherhood, an online Star Wars Club
m (Help:Category complete)
 
(import from google cache)
Line 1: Line 1:
{{Help contents back}}
<table style="background:transparent"><tr>
'''Categories''' are a software feature of MediaWiki, which enables pages to be added to automatic listings. These help structure a project such as DJBWiki by grouping together pages on similar subjects.
<td> [[Help:Contents|<img alt="" src="/code/images/thumb/8/8e/1leftarrow.png/16px-1leftarrow.png" width="16" height="16" border="0">]]
</td>
<td> <big>[[Help:Contents]]</big>
</td>
</tr></table>'''Categories''' are a software feature of MediaWiki, which enables pages to be added to automatic listings. These help structure a project such as DJBWiki by grouping together pages on similar subjects.


==Putting pages in categories==
 
A page belongs to a category if the page's wikitext contains a declaration for that category. A category declaration takes the form <nowiki>[[</nowiki>Category:''Category name'']] or <nowiki>[[</nowiki>Category:''Category name''|''Sortkey'']]. The declaration must be processed, i.e. it will not work if it appears between <nowiki&gt;...</nowiki&gt; or <includeonly&gt;...</includeonly&gt; tags, or in a comment. The declaration may however come from a [http://en.wikipedia.org/wiki/Wikipedia:Transclusion transcluded] page.
 
== Putting pages in categories ==
A page belongs to a category if the page's wikitext contains a declaration for that category. A category declaration takes the form [[Category:''Category name'']] or [[Category:''Category name''|''Sortkey'']]. The declaration must be processed, i.e. it will not work if it appears between &lt;nowiki&gt;...&lt;/nowiki&gt; or &lt;includeonly&gt;...&lt;/includeonly&gt; tags, or in a comment. The declaration may however come from a [http://en.wikipedia.org/wiki/Wikipedia:Transclusion transcluded] page.


In DJBWiki, it is customary to place category declarations at the end of the wikitext.
In DJBWiki, it is customary to place category declarations at the end of the wikitext.
Line 9: Line 15:
When a page has been added to one or more categories, a categories box appears at the bottom of the page. This box contains a list of the categories the page belongs to, in the order in which the category declarations appear in the processed wikitext. The category names are linked to the corresponding category pages. They appear as redlinks if no category page currently exists.
When a page has been added to one or more categories, a categories box appears at the bottom of the page. This box contains a list of the categories the page belongs to, in the order in which the category declarations appear in the processed wikitext. The category names are linked to the corresponding category pages. They appear as redlinks if no category page currently exists.


==Sort keys==
All articles in a given category are sorted alphabetically. If you want an article to be sorted by something other than its name, you should use the following link form in the article's text: <nowiki>[[Category:</nowiki>''Example''<nowiki>|</nowiki>''Sort key''<nowiki>]]</nowiki> (where ''Example'' is the category name, and ''Sort key'' is the value to sort the list by).


For example, by default, the article [[Sith Bloodfyre]] will be listed under the character's first name, "S", because it is the first letter of the article's name.  You could instead force the article to be listed by the character's last name ("Bloodfyre, Sith") by using the string <nowiki>[[Category:DJB Characters|Bloodfyre, Sith]]</nowiki>.


Remember that sort keys are case sensitive, with capital letters being sorted before lowercase letters. Therefore, ''Bloodfyre, Sith'' would appear in the list before ''bed''.
==  Sort keys  ==
All articles in a given category are sorted alphabetically. If you want an article to be sorted by something other than its name, you should use the following link form in the article's text: [[Category:''Example''|''Sort key'']] (where ''Example'' is the category name, and ''Sort key'' is the value to sort the list by).
 
For example, by default, the article [[Sith Bloodfyre]] will be listed under the character's first name, "S", because it is the first letter of the article's name. You could instead force the article to be listed by the character's last name ("Bloodfyre, Sith") by using the string [[Category:DJB Characters|Bloodfyre, Sith]].
 
Remember that sort keys are case sensitive, with capital letters being sorted before lowercase letters. Therefore, ''Bloodfyre, Sith'' would appear in the list before ''bed''.
 
 


==Linking to a category==
== Linking to a category ==
To link to a category page ''without'' putting the current page in that category, precede the link with a colon: <nowiki>[[:Category:Category name]]</nowiki>.
To link to a category page ''without'' putting the current page in that category, precede the link with a colon: [[:Category:Category name]].


==Category Policy==
 
 
== Category Policy ==
The [[Wiki Tribune]] has decided that categories must contain at least ten in order to exist on DJBWiki.
The [[Wiki Tribune]] has decided that categories must contain at least ten in order to exist on DJBWiki.
[[Category:DJB Help]]
[[Category:DJB Help]]

Revision as of 06:43, 23 May 2011

<img alt="" src="/code/images/thumb/8/8e/1leftarrow.png/16px-1leftarrow.png" width="16" height="16" border="0"> Help:Contents

Categories are a software feature of MediaWiki, which enables pages to be added to automatic listings. These help structure a project such as DJBWiki by grouping together pages on similar subjects.


Putting pages in categories

A page belongs to a category if the page's wikitext contains a declaration for that category. A category declaration takes the form or. The declaration must be processed, i.e. it will not work if it appears between <nowiki>...</nowiki> or <includeonly>...</includeonly> tags, or in a comment. The declaration may however come from a transcluded page.

In DJBWiki, it is customary to place category declarations at the end of the wikitext.

When a page has been added to one or more categories, a categories box appears at the bottom of the page. This box contains a list of the categories the page belongs to, in the order in which the category declarations appear in the processed wikitext. The category names are linked to the corresponding category pages. They appear as redlinks if no category page currently exists.


Sort keys

All articles in a given category are sorted alphabetically. If you want an article to be sorted by something other than its name, you should use the following link form in the article's text: (where Example is the category name, and Sort key is the value to sort the list by).

For example, by default, the article Sith Bloodfyre will be listed under the character's first name, "S", because it is the first letter of the article's name. You could instead force the article to be listed by the character's last name ("Bloodfyre, Sith") by using the string.

Remember that sort keys are case sensitive, with capital letters being sorted before lowercase letters. Therefore, Bloodfyre, Sith would appear in the list before bed.


Linking to a category

To link to a category page without putting the current page in that category, precede the link with a colon: Category:Category name.


Category Policy

The Wiki Tribune has decided that categories must contain at least ten in order to exist on DJBWiki.