Help:Categories: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Created page with "A '''category''' is a software feature of MediaWiki, a special page which is intended to group related pages and media. In practice, it implies that you'll associate a single ...")
 
(+ Wiki help navbar template)
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
A '''category''' is a software feature of MediaWiki, a special page which is intended to group related pages and media. In practice, it implies that you'll associate a single subject with a given category. The category name would be enough to guess the subject, but some extra text can be useful to precisely define it.
{{tip|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.}}
{{tip|A good file description on file pages is a better help to finding it than adding many categories.}}
{{note|Categories are not tags.  Adding more categories than necessary to a lot of pages will make it harder to find a particular page on category pages.}}


== Quick guide ==
{{Wiki help navbar}}
# How to find the appropriate categories
#* Find categories with the search engine (see #Categorization tips)
#* or check how similar images are categorized (some may not be categorized though)
#* Starting from these categories, check their parent or sub-categories to find an appropriate category. Avoid picking too general categories.
# Add the categories to the file/image
#* Select them on the upload form
#* or: add them manually by adding, e.g. <code><nowiki>[[Category:Foobar]]</nowiki></code> to the file description page (see #Categorizing_pages)


== How to use categories ==
Through '''categories''' related pages or files can be grouped together similar to books on the same topic in a library to make it easier to find them.  A category is represented by a ''category page'' listing all the pages in that category.  The category pages reside in the ''category namespace'' discerned by page titles beginning with "Category:".
You should always put your uploads into categories and/or gallery pages according to topic, so your contributions can be found and used by others.


=== Category names ===
Pages are categorised by links to the category pages.  These links 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.
Category names should generally be in English.


=== Categorizing pages ===
== Searching for and browsing categories ==
To add a page (be it a real article, an image or a category page) to a category, add the following code to the end of the page.  
=== The search box and search page ===
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.


'''<nowiki>[[</nowiki>Category:'''''Category Name''''']]'''
=== Through another article ===
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.


For information on how to find good categories for your uploads and galleries, read the section ''[[#Find an appropriate category|Find an appropriate category]]'' below.
=== The CategoryTree extension ===
The CategoryTree extension adds two useful features:


=== Creating a new category ===
# Subcategories on category pages are made expandable.  Click on any blue triangles.
To create a new category:
# Subcategories can be browsed with the CategoryTree tool. Try for example [[Special:CategoryTree/Root category]].
# Do a thorough search, to be sure there isn't an existing category that will serve the purpose.
# Find pages or images which should be put in the new category. Edit this page, and at the end insert the new category reference. ''e.g.'' <code><nowiki>[[Category:Title]]</nowiki></code>. Save the edited page. The new category appears as a red link at the bottom of the page.
# Click on that red link. The new, empty, category page appears for editing. You can now edit the category like any other wiki page.


A category page should contain the following information (in order of importance):
== Categorizing pages ==
*Category-links that put it into one or more parent categories. At the bottom of the new page, insert lines of the form <code><nowiki>[[Category:Relevant categories]]</nowiki></code>.
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.
*A short description text that explains what should be in the category, if the title is not clear or unambiguous enough on its own.
 
* If the category should be sorted according to a different string than the category title, add a <code><nowiki>{{DEFAULTSORT:}}</nowiki></code>. 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.
<nowiki>[[</nowiki>'''Category:'''Category name<nowiki>]]</nowiki>
 
=== Quick guide to categorising ===
# Find appropriate categories
#* By searching (see [[#Searching for and browsing categories]])
#* 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.
# Add categories to the page or file
#* By selecting them on the upload form or in the wizard
#* By manually adding for example <code><nowiki>[[Category:Foobar]]</nowiki></code> to the bottom of the page or file description page
 
=== A note about subcategories ===
Use a category that is as specific as possible, unless of course there would only be some few pages in that category.  If there is a subcategory, please use that subcategory instead of its parent category and use only the subcategory.  The reason for this is that the category page of the parent category would otherwise be more cluttered and that finding a certain page in that category will be more difficult.
 
== 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 <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>
 
For example like below:
 
<nowiki>[[Category:Boeing|707-320]]</nowiki>
 
=== 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 add the page to that category (see [[#Categorizing pages]]).
 
{| class="wikitable" width="100%"
! Description
! width="30%" | What you type
! width="30%" | What you get
|-
| Linking to a category must be done with a preceding colon ('''<nowiki>:</nowiki>''').
|
<nowiki>[[:Category:Help]]</nowiki>
| [[:Category:Help]]
|-
| Links to categories can use a pipe ('''<nowiki>|</nowiki>''') as well.
|
<pre style="white-space: pre-wrap;">See the [[:Category:Help|help]] category.</pre>
| See the [[:Category:Help|help]] category.
|}


== Related content ==
== Related content ==
* [[Special:Categories]] lists all categories.
* [[Help:Creating new categories]]
* [[:Category:Images]] lists all image categories.
* [[FlightGear wiki:FlightGear screenshot categories]]
* [[:Category:Images]] – Lists all image categories
* [[Special:Categories]] – Lists all categories
* [[Special:CategoryTree/Root category]] – Tool for browsing the categories
 
== External links ==
* [http://meta.wikimedia.org/wiki/Help:Categories WikiMedia Meta-Wiki: Help:Categories]


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

Revision as of 11:42, 3 June 2018

Tip  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.
Tip  A good file description on file pages is a better help to finding it than adding many categories.
Note  Categories are not tags. Adding more categories than necessary to a lot of pages will make it harder to find a particular page on category pages.


Through categories related pages or files can be grouped together similar to books on the same topic in a library to make it easier to find them. A category is represented by a category page listing all the pages in that category. The category pages reside in the category namespace discerned by page titles beginning with "Category:".

Pages are categorised by links to the category pages. These links 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.

Searching for and browsing categories

The search box and search page

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.

Through another article

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.

The CategoryTree extension

The CategoryTree extension adds two useful features:

  1. Subcategories on category pages are made expandable. Click on any blue triangles.
  2. Subcategories can be browsed with the CategoryTree tool. Try for example Special:CategoryTree/Root category.

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

Quick guide to categorising

  1. Find appropriate categories
    • By searching (see #Searching for and browsing categories)
    • 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 bottom of the page or file description page

A note about subcategories

Use a category that is as specific as possible, unless of course there would only be some few pages in that category. If there is a subcategory, please use that subcategory instead of its parent category and use only the subcategory. The reason for this is that the category page of the parent category would otherwise be more cluttered and that finding a certain page in that category will be more difficult.

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 add the page to that category (see #Categorizing pages).

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.

Related content

External links