|
|
Line 27: |
Line 27: |
|
| |
|
| == 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: [[:Category:Category name]]. | | 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>. |
| | |
| | |
|
| |
|
| == Category Policy == | | == Category Policy == |
Revision as of 05:48, 30 May 2011
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.