Help:Category

From Wikipedia of the Dark Brotherhood, an online Star Wars Club
Revision as of 16:40, 1 April 2024 by Alethia Archenksova (talk | contribs) (Adding nowiki tags)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 [[Category:''Category name'']] or [[Category:''Category name''|''Sortkey'']]. 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: [[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

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.