Help:Categories: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Rewritten and extended)
(Headings + More on sort keys + Link to more detailed help)
Line 2: Line 2:


On the category pages the pages in a category are listed, and pages are categorised by links to the category pages which are shown on the bottom of the pages, unless categories are ''hidden categories''.  The category pages are themselves categorised and form a network of related categories that can be browsed at the peril of the reader.
On the category pages the pages in a category are listed, and pages are categorised by links to the category pages which are shown on the bottom of the pages, unless categories are ''hidden categories''.  The category pages are themselves categorised and form a network of related categories that can be browsed at the peril of the reader.
: Always ''add categories to pages and uploaded files.  This way they will be easier to find, both by browsing through the categories and by searching, even more so by using external search engines, for example Google search.''


== Quick guide to categorising ==
== Quick guide to categorising ==
Line 12: Line 14:
#* By manually adding for example <code><nowiki>[[Category:Foobar]]</nowiki></code> to the page or file description page
#* By manually adding for example <code><nowiki>[[Category:Foobar]]</nowiki></code> to the page or file description page


== Using categories ==
== Searching for and browsing categories ==
Always add pages and uploaded files to categories.  This way they will be easier to find, both by browsing through the categories and by searching, even more so by using external search engines, for example Google search.
 
=== Searching for and browsing categories ===
You can search specifically for categories by using beginning your search string with "Category:".  Note though that the wiki is ''very'' picky about both spelling and, unfortunately, case.  Another way is just search and on the results page tick the Category namespace box and search again.
You can search specifically for categories by using beginning your search string with "Category:".  Note though that the wiki is ''very'' picky about both spelling and, unfortunately, case.  Another way is just search and on the results page tick the Category namespace box and search again.


Another way, that sometimes is more effective is to look up an article that logically should have a certain category or a related one and go to the category page from the category link at the bottom of the page, and from there browse the category structure.
Another way, that sometimes is more effective is to look up an article that logically should have a certain category or a related one and go to the category page from the category link at the bottom of the page, and from there browse the category structure.


=== Categorizing pages ===
== Categorizing pages ==
To add a page (be it an article, an image or any other editable page) to a category, add the following wiki markup to the end of the page, just before the language links to translated pages.  
To add a page (be it an article, an image or any other editable page) to a category, add the following wiki markup to the end of the page, just before the language links to translated pages.  


  <nowiki>[[</nowiki>'''Category:'''Category name<nowiki>]]</nowiki>
  <nowiki>[[</nowiki>'''Category:'''Category name<nowiki>]]</nowiki>


=== Category sorting ===
== Category sorting ==
Sometimes you want a page to be sorted under a different name on the category page. This can be done using a vertical stroke or pipe and sort key in the category link.
Sometimes you want a page to be sorted under a different name on the category page. This can be done using a vertical stroke or pipe and sort key in the category link, or by using the magic word <code><nowiki>{{DEFAULTSORT}}</nowiki></code>.
 
=== Using a sort key ===
If there is only a few category links, or if the page for some reason is to be sorted differently in different categories using piped category links is preferable.  The sort key are then used after a pipe or vertical stroke as below:


  <nowiki>[[</nowiki>'''Category:'''Category name<nowiki>|</nowiki>''Sort key''<nowiki>]]</nowiki>
  <nowiki>[[</nowiki>'''Category:'''Category name<nowiki>|</nowiki>''Sort key''<nowiki>]]</nowiki>
Line 34: Line 36:
  <nowiki>[[Category:Boeing|707-320]]</nowiki>
  <nowiki>[[Category:Boeing|707-320]]</nowiki>


=== Linking to category pages ===
=== Using a default sort key ===
If a page have several categories it is probably easier to use the magic word <code><nowiki>{{DEFAULTSORT:}}</nowiki></code>:
 
<nowiki>{{</nowiki>'''DEFAULTSORT''':''Sort key''<nowiki>}}</nowiki>
 
For example like the below examples:
 
<nowiki>{{DEFAULTSORT:707-320}}</nowiki>
 
or
 
<nowiki>{{</nowiki>DEFAULTSORT:''Last name'', ''First name''<nowiki>}}</nowiki>
 
Do note that the default sort key should preferably be on top of a page as the last one on a page will override any other category sorting, including category sorting by templates.
 
== Linking to category pages ==
Linking to category pages can be done like below.  Do note that the category name have to be preceded by a colon.  A regular link will not be shown in the article text, but will add the page to that category.
Linking to category pages can be done like below.  Do note that the category name have to be preceded by a colon.  A regular link will not be shown in the article text, but will add the page to that category.


Line 55: Line 72:
== Creating new categories ==
== Creating new categories ==
=== Category names ===
=== Category names ===
Category names should generally be in English, and to the point.  In general a shorter name is preferable, but sometimes being more specific is necessary.  It is also often preferable to not mix articles, images or templates, which can be avoided by through the category name specifying what a category is for.
Category names should generally be in English, and to the point.  Categories containing pages about individual subjects, for example aircraft, should be in plural form.  In general a shorter name is preferable, but sometimes being more specific is necessary.  It is also often preferable to not mix articles, images or templates, which can be avoided by through the category name specifying what a category is for.


Category names, as other page names, are except for the initial character case sensitive.  It is therefore often preferable that only the initial character in the category name should be capital, as using the category might be less easy, not to mention searching for it.  When the category is related to a certain subject that have more capitals than only the initial character, for example FGCom, it probably is preferable to use the more common spelling.
Category names, as other page names, are except for the initial character case sensitive.  It is therefore often preferable that only the initial character in the category name should be capital, as using the category might be less easy, not to mention searching for it.  When the category is related to a certain subject that have more capitals than only the initial character, for example FGCom, it probably is preferable to use the more common spelling.
Line 71: Line 88:


=== Category page contents ===
=== Category page contents ===
  <nowiki>{{en|This is an example category.}}
  <nowiki>{{DEFAULTSORT:Some default sort key}}


[[Category:Examples|Category]]</nowiki>
{{en|Some category description.}}
 
[[Category:Some category|Some sort key]]</nowiki>


A category page should contain the following information (in order of importance):
A category page should contain the following information (in order of importance):
# Category links that put it into one or more parent categories. At the bottom of the new page.
# Category links that put it into one or more parent categories. At the bottom of the new page.
# A short description text that explains what should be in the category, if the title is not clear or unambiguous enough on its own.  Preferably use a [[:Category:Language templates|language template]].
# A short description text that explains what should be in the category, if the title is not clear or unambiguous enough on its own.  Preferably use a [[:Category:Language templates|language template]].
# If the category should be sorted according to a different string than the category title, either use category sorting using a sort key or add a <code><nowiki>{{DEFAULTSORT:}}</nowiki></code> magic word. For instance, the title of a category about a person would not be the right sort string. For such categories, insert after the interwiki links a line like <code><nowiki>{{DEFAULTSORT:Lastname, firstname}}</nowiki></code> with the correct sort string.
# If the category should be sorted according to a different string than the category title, use category sorting either with sort keys or a default sort key.


== Related content ==
== Related content ==
* [[Special:Categories]] lists all categories.
* [[Special:Categories]] lists all categories.
* [[:Category:Images]] lists all image categories.
* [[:Category:Images]] lists all image categories.
== External links ==
* [http://meta.wikimedia.org/wiki/Help:Categories WikiMedia Meta-Wiki: Help:Categories]


[[Category:Help]]
[[Category:Help]]

Revision as of 06:19, 26 December 2013

Through categories related pages or files can be grouped together to make it easier to find them. The categories are represented by category pages, pages in the category namespace discerned by page titles beginning with "Category:".

On the category pages the pages in a category are listed, and pages are categorised by links to the category pages which are shown on the bottom of the pages, unless categories are hidden categories. The category pages are themselves categorised and form a network of related categories that can be browsed at the peril of the reader.

Always add categories to pages and uploaded files. This way they will be easier to find, both by browsing through the categories and by searching, even more so by using external search engines, for example Google search.

Quick guide to categorising

  1. Find appropriate categories
    • By searching (see #Categorization tips)
    • By checking how similar pages or images are categorized (though some may not yet have been categorized)
    • Starting a category, check its parent or sub-categories to find an appropriate category. Avoid picking too general categories.
  2. Add categories to the page or file
    • By selecting them on the upload form or in the wizard
    • By manually adding for example [[Category:Foobar]] to the page or file description page

Searching for and browsing categories

You can search specifically for categories by using beginning your search string with "Category:". Note though that the wiki is very picky about both spelling and, unfortunately, case. Another way is just search and on the results page tick the Category namespace box and search again.

Another way, that sometimes is more effective is to look up an article that logically should have a certain category or a related one and go to the category page from the category link at the bottom of the page, and from there browse the category structure.

Categorizing pages

To add a page (be it an article, an image or any other editable page) to a category, add the following wiki markup to the end of the page, just before the language links to translated pages.

[[Category:Category name]]

Category sorting

Sometimes you want a page to be sorted under a different name on the category page. This can be done using a vertical stroke or pipe and sort key in the category link, or by using the magic word {{DEFAULTSORT}}.

Using a sort key

If there is only a few category links, or if the page for some reason is to be sorted differently in different categories using piped category links is preferable. The sort key are then used after a pipe or vertical stroke as below:

[[Category:Category name|Sort key]]

For example like below:

[[Category:Boeing|707-320]]

Using a default sort key

If a page have several categories it is probably easier to use the magic word {{DEFAULTSORT:}}:

{{DEFAULTSORT:Sort key}}

For example like the below examples:

{{DEFAULTSORT:707-320}}

or

{{DEFAULTSORT:Last name, First name}}

Do note that the default sort key should preferably be on top of a page as the last one on a page will override any other category sorting, including category sorting by templates.

Linking to category pages

Linking to category pages can be done like below. Do note that the category name have to be preceded by a colon. A regular link will not be shown in the article text, but will add the page to that category.

Description What you type What you get
Linking to a category must be done with a preceding colon (:).
[[:Category:Help]]
Category:Help
Links to categories can use a pipe (|) as well.
See the [[:Category:Help|help]] category.
See the help category.

Creating new categories

Category names

Category names should generally be in English, and to the point. Categories containing pages about individual subjects, for example aircraft, should be in plural form. In general a shorter name is preferable, but sometimes being more specific is necessary. It is also often preferable to not mix articles, images or templates, which can be avoided by through the category name specifying what a category is for.

Category names, as other page names, are except for the initial character case sensitive. It is therefore often preferable that only the initial character in the category name should be capital, as using the category might be less easy, not to mention searching for it. When the category is related to a certain subject that have more capitals than only the initial character, for example FGCom, it probably is preferable to use the more common spelling.

Creating a new category page

To create a new category:

  • By first editing a page
    1. Search for variants of the intended category name, to be sure there isn't an existing category that will serve the purpose.
    2. Find pages or images which should be put in the new category. Edit one of those pages, and at the end, but before the language links, insert the new category reference, for example [[Category:Title]]. Save the edited page. The new category appears as a red link at the bottom of the page.
    3. Click on that red link. The new, empty, category page appears for editing. You can now edit the category like any other wiki page.
  • By searching for a page
    1. As above search for variants of the intended category name.
    2. Click the red link with the page name you searched for to open up an editing window.

Category page contents

{{DEFAULTSORT:Some default sort key}}

{{en|Some category description.}}

[[Category:Some category|Some sort key]]

A category page should contain the following information (in order of importance):

  1. Category links that put it into one or more parent categories. At the bottom of the new page.
  2. A short description text that explains what should be in the category, if the title is not clear or unambiguous enough on its own. Preferably use a language template.
  3. If the category should be sorted according to a different string than the category title, use category sorting either with sort keys or a default sort key.

Related content

External links