Help:Category: Difference between revisions

From Wikipedia of the Dark Brotherhood, an online Star Wars Club
m (Help:Category complete)
 
(Adding nowiki tags)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Help contents back}}
{{Help contents back}}  
'''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.
'''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 <nowiki>[[Category:''Category name'']]</nowiki> or <nowiki>[[Category:''Category name''|''Sortkey'']]</nowiki>. 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 11:
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: <nowiki>[[Category:''Example''|''Sort key'']]</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''.
 
 


==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: <nowiki>[[:Category:Category name]]</nowiki>.


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

Latest revision as of 16:40, 1 April 2024

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.