FANDOM


m (Category presentation)
(begin major reconstruct)
Line 1: Line 1:
{{tocright}}{{Needs editor update}}
+
[[file:CategoriesUnfurled.png|thumb|right|275px|Categories seen at the top of the page, including a view of the drop-down when you click on "more"]]
A '''category''' is a group of pages with a similar theme, such as characters, books, or places. You can add a category link to any page, and it will automatically be listed on a category page with other similarly linked pages. Categories perform as navigational tools both in the [[User blog:Brandon Rhea/New Page and Article Headers: Official Release Date|article header]] and at the bottom of the page.
+
A '''category''' is a group of pages with a similar theme, such as characters, books, or places. You can add a category link to any page, and it will automatically be listed on a category page with other similarly-linked pages.
   
[[File:Categories_in_an_article_header_.png|center|Categories perform as navigational tools in the article header|400px]]
+
Categories are thus navigational tools — both in the [[User blog:Brandon Rhea/New Page and Article Headers: Official Release Date|article header]] and at the bottom of the page.
   
Categories help organize the community and make it easier for readers to find related content. They also allow you to put together a [[Help:Mobile Main Page|mobile main page]] for visitors on phones or tablets. Ideally, every wiki page should be in at least one category. A category page itself can be in another category. So, for example, a wiki might have a category called "Characters" with sub-categories for "Minor characters", "Dead characters", and "Main characters".
+
== Why categories are important ==
  +
{{tocright}}
  +
Categories help organize the community and make it easier for readers to find related content. Ideally, every wiki page should be in at least one category. Since categories can be within ''other'' categories, you can start to build a structure — a "[[Special:CategoryTree|category tree]]" — which lets your readers move around your site. For example, a person might start on a page in '''Main characters''', then move up to '''Characters''', then move back down again to '''Minor characters''' and then on to '''Minor characters from season 7'''. They're able to do this because '''Main characters''' acts as the trunk of a tree on which the branches of the other categories about characters are hung.
   
At the bottom of each page, there is a set of "Related Pages" images to help guide visitors from one page to another. These are chosen based on category tags on each page. The more specific the category tags are, the better these suggestions will be.
+
Aside from these navigational uses, proper categorization is crucial to a number of other processes, like:
  +
* the [[Help:Mobile Main Page|mobile main page]]
  +
* [[Help:DynamicPageList|DynamicPageList]] usage on your site
  +
* many [[Help:Bots|bot]] usages
  +
* the "Related Pages" module
   
== How to add a page to a category ==
+
These and other features won't work as well if your wiki's category structure is weak.
A page appears in a category when a category link is added to that individual page. You cannot add pages to a category from the category's listing page.
+
== Adding a page to a category ==
  +
To add a category, begin by going to the page you wish to categorize. Then use either the '''category module''' at the bottom of the page, or an '''editor''', to add your category.
   
=== From the page ===
+
=== From the category module ===
[[File:CategorySelect suggest.png|thumb|center|600px|Adding a category, with suggestions]]
+
[[File:CategorySelect suggest.png|thumb|right|275px|Adding a category via the category module. Note how '''existing''' categories are suggested to you.]]
At the bottom of the page where categories are listed, you are presented with the ability to add a category without hitting the edit button.
+
Use the '''category module''', and you don't have to open an editor. Just go to the bottom of the page, where the existing categories are.
* Click on the "Add category" button, and start typing in a category name.
+
* Click on the '''Add category''' button, and start typing in a category name.
* You can use an already established category (suggestions will appear as you type) or add a new one.
+
* You can use an already-established category (suggestions will appear as you type) or add a new one.
 
* Once you are done, hit save and the category will appear on the article.
 
* Once you are done, hit save and the category will appear on the article.
   
If you would prefer not to use this ability, you can disable it by going to your [[Special:Preferences|personal preferences]]. Once there, click on the '''editing''' tab, check the box next to "Disable Category module" and then save your preferences.
+
If you would prefer not to use this ability, you can disable it by going to your [[Special:Preferences|personal preferences]]. Once there, click on the '''Editing''' tab, check the box next to '''Disable Category module''' and then save your preferences.
   
 
=== While editing ===
 
=== While editing ===
  +
How you add categories while editing depends on which of our three editors you choose to use.
  +
==== Our visual editors ====
  +
===== VisualEditor itself=====
  +
[[File:VECatLocation.png|thumb|right|275px|In [[help:VisualEditor|VisualEditor]], first find the dropdown menu in the upper right]]
  +
[[File:VECatSuggest.png|thumb|right|275px|In the VisualEditor, these are some of the categories that are suggested on a page about [[w:c:starwars:Rey|Rey]] from ''Star Wars''.]]
  +
In the [[Help:VisualEditor|VisualEditor]] you first have to click on the dropdown menu to the left of the '''Cancel''' button and pull down to '''Categories'''.
  +
  +
Once you're in the Categories dialogue box, enter a category into the top field. [[#When does a category exist?|Existing categories]] will show up as you type in more letters. You can then just select from that list.
  +
  +
If you want to change the way the page is sorted, you can do that in the second field. Most of the time, you'll probably go with the default — which is just the way the title naturally appears. But for people, you might want to sort by last name. So if the page is named '''Charlie Brown''', you might enter '''Brown, Charlie''' in that second box.
  +
  +
Once you've got things how you want them, click on '''Apply changes'''. This only makes the category a part of your ''potential'' edit, though.
  +
  +
To publish the change to the live page, click on '''Save page''' when you're returned to the main editing pane of the VisualEditor.
  +
===== Classic rich-text editor =====
 
[[File:Adding category edit mode.png|thumb|250px|Adding, removing or editing a category from the editor]]
 
[[File:Adding category edit mode.png|thumb|250px|Adding, removing or editing a category from the editor]]
 
On the right hand side of the editor is a '''Categories''' module. Click to expand this and you will see a list of the categories already present.
 
On the right hand side of the editor is a '''Categories''' module. Click to expand this and you will see a list of the categories already present.
Line 27: Line 42:
 
* Click the trash can to remove the category.
 
* Click the trash can to remove the category.
   
While in source mode, you can add the category name as a link to the bottom of the page itself (e.g. <code><nowiki>[[Category:Help]]</nowiki></code>), or use the category module. Existing categories will not appear at the bottom of the page in source mode, so you must check the category module at the right for existing categories.
+
==== Source editor ====
  +
While in [[help:source edit mode|source]], you can add the category name as a link to the bottom of the page itself (e.g. <code><nowiki>[[Category:Help]]</nowiki></code>), or use the category module in the right rail.
  +
  +
By default, exiting categories appear in the category module in the right rail. However, if you choose to disable the category module in your [[Special:Preferences|preferences]], they ''do'' appear at the very bottom of the page.
   
 
=== Sort parameters ===
 
=== Sort parameters ===
Line 33: Line 48:
 
*If an article ''example'' is the introduction for category ''example'', a blank (space) or '''<kbd>*</kbd>''' (asterisk) sortkey puts it near the begin of the category.
 
*If an article ''example'' is the introduction for category ''example'', a blank (space) or '''<kbd>*</kbd>''' (asterisk) sortkey puts it near the begin of the category.
 
*If the article is in many categories, you can add <code><nowiki>{{DEFAULTSORT:<sort key>}}</nowiki></code> in the article while editing in [[Help:Source edit mode|source mode]] to sort the article in all the categories the same way. This will save you from having to edit each category's parameters individually.
 
*If the article is in many categories, you can add <code><nowiki>{{DEFAULTSORT:<sort key>}}</nowiki></code> in the article while editing in [[Help:Source edit mode|source mode]] to sort the article in all the categories the same way. This will save you from having to edit each category's parameters individually.
  +
== When does a category exist? ==
  +
Unlike other aspects of wikis, categories have several states of being, and it can be tricky understanding whether or not they "exist".
   
== Category pages ==
+
Placing a page into a category ''sort'' of creates the category. If you add a page to '''Category:My new category''', for instance, you can to to that page and see a list of the pages in it.
=== How to create category pages ===
+
== Creating a category ==
Adding a category to a page—say, "Transylvanian vampires"—begins the process of creating a category, but it doesn't create the page called "Category:Transylvanian vampires". You can view the category by clicking the category name at the bottom of the regular page.
+
You'll save yourself a lot of time if you start by creating a category. To do this, start a new page — in any of our editors — and add a sentence or two which explains what the category. This steps helps your [[Help:SEO|site's ranking on search engines]] quite a bit. Then add the page to another category that has already been created.
   
If you wish to add text or other categories to the category page itself (such as an explanation of the types of pages included), then go to the category page and click the "Create" button to create it. Edit it as you would a normal wiki page, and click "Publish". Your text will appear at the top of the page, followed by the list of pages in that category.
+
For instance, let's say your wiki is about the Marvel Universe, and you're starting a category about female heroes in the Marvel ''Cinematic'' Universe (aka Earth-199999). So you create the category '''Female superheroes (Earth-199999)''' by adding the text:
   
=== How to delete category pages ===
+
:<code>'''Female superheroes of Earth-199999'''<nowiki> came from every part of that Earth, exhibiting a wide range of powers, both meta—human and mortal. This category collects pages on this wiki about them, as well as many images and videos featuring their exploits.</nowiki></code>
  +
  +
Then you add it to '''Category:Earth-19999''' and hit '''Publish'''.
  +
  +
This step is crucial, because once you publish a category page, it then will be usable by the category module. That is, it will appear as an auto-suggestion when you try to add it to other pages.
  +
  +
It will also be usable by [[Help:Bots|all bots]], [[Help:DynamicPageList|DynamicPageList]], the [[Help:Mobile Main Page]], and other features.
  +
  +
== Deleting a category ===
 
To delete a category, first remove the category tag from all pages in the category as described above.
 
To delete a category, first remove the category tag from all pages in the category as described above.
   
Line 63: Line 80:
 
* In list mode, the category gallery appears above an alphabetical listing of all pages in the category.
 
* In list mode, the category gallery appears above an alphabetical listing of all pages in the category.
 
[[File:CatExhibitionSample.png|thumb|center|500px|A category with Category Exhibition enabled.]]
 
[[File:CatExhibitionSample.png|thumb|center|500px|A category with Category Exhibition enabled.]]
 
== Where to go next ==
 
* Learn how to create [[Help:Templates|Templates]]
 
* Learn how to create [[Help:Infobox|Infoboxes]]
 
* Learn how to create [[Help:Tables|Tables]]
 
* Ask other users on the [[homepage:w:Special:Forum|Support Forums]]
 
   
 
== Further reading ==
 
== Further reading ==

Revision as of 00:57, June 29, 2019

CategoriesUnfurled

Categories seen at the top of the page, including a view of the drop-down when you click on "more"

A category is a group of pages with a similar theme, such as characters, books, or places. You can add a category link to any page, and it will automatically be listed on a category page with other similarly-linked pages.

Categories are thus navigational tools — both in the article header and at the bottom of the page.

Why categories are important

Categories help organize the community and make it easier for readers to find related content. Ideally, every wiki page should be in at least one category. Since categories can be within other categories, you can start to build a structure — a "category tree" — which lets your readers move around your site. For example, a person might start on a page in Main characters, then move up to Characters, then move back down again to Minor characters and then on to Minor characters from season 7. They're able to do this because Main characters acts as the trunk of a tree on which the branches of the other categories about characters are hung.

Aside from these navigational uses, proper categorization is crucial to a number of other processes, like:

These and other features won't work as well if your wiki's category structure is weak.

Adding a page to a category

To add a category, begin by going to the page you wish to categorize. Then use either the category module at the bottom of the page, or an editor, to add your category.

From the category module

CategorySelect suggest

Adding a category via the category module. Note how existing categories are suggested to you.

Use the category module, and you don't have to open an editor. Just go to the bottom of the page, where the existing categories are.

  • Click on the Add category button, and start typing in a category name.
  • You can use an already-established category (suggestions will appear as you type) or add a new one.
  • Once you are done, hit save and the category will appear on the article.

If you would prefer not to use this ability, you can disable it by going to your personal preferences. Once there, click on the Editing tab, check the box next to Disable Category module and then save your preferences.

While editing

How you add categories while editing depends on which of our three editors you choose to use.

Our visual editors

VisualEditor itself
VECatLocation

In VisualEditor, first find the dropdown menu in the upper right

VECatSuggest

In the VisualEditor, these are some of the categories that are suggested on a page about Rey from Star Wars.

In the VisualEditor you first have to click on the dropdown menu to the left of the Cancel button and pull down to Categories.

Once you're in the Categories dialogue box, enter a category into the top field. Existing categories will show up as you type in more letters. You can then just select from that list.

If you want to change the way the page is sorted, you can do that in the second field. Most of the time, you'll probably go with the default — which is just the way the title naturally appears. But for people, you might want to sort by last name. So if the page is named Charlie Brown, you might enter Brown, Charlie in that second box.

Once you've got things how you want them, click on Apply changes. This only makes the category a part of your potential edit, though.

To publish the change to the live page, click on Save page when you're returned to the main editing pane of the VisualEditor.

Classic rich-text editor
Adding category edit mode

Adding, removing or editing a category from the editor

On the right hand side of the editor is a Categories module. Click to expand this and you will see a list of the categories already present.

  • To add a category, type the category name in the input area above the existing categories. As you type, you will see suggestions appear.
  • Click the pencil next to each category to edit that category's settings.
  • Click the trash can to remove the category.

Source editor

While in source, you can add the category name as a link to the bottom of the page itself (e.g. [[Category:Help]]), or use the category module in the right rail.

By default, exiting categories appear in the category module in the right rail. However, if you choose to disable the category module in your preferences, they do appear at the very bottom of the page.

Sort parameters

  • When clicking the edit icon next to category names, you can define a "sortkey" for that category. This sortkey defines at what point the article appears in a category page's listings, e.g., sort a first last name page under last name.
  • If an article example is the introduction for category example, a blank (space) or * (asterisk) sortkey puts it near the begin of the category.
  • If the article is in many categories, you can add {{DEFAULTSORT:<sort key>}} in the article while editing in source mode to sort the article in all the categories the same way. This will save you from having to edit each category's parameters individually.

When does a category exist?

Unlike other aspects of wikis, categories have several states of being, and it can be tricky understanding whether or not they "exist".

Placing a page into a category sort of creates the category. If you add a page to Category:My new category, for instance, you can to to that page and see a list of the pages in it.

Creating a category

You'll save yourself a lot of time if you start by creating a category. To do this, start a new page — in any of our editors — and add a sentence or two which explains what the category. This steps helps your site's ranking on search engines quite a bit. Then add the page to another category that has already been created.

For instance, let's say your wiki is about the Marvel Universe, and you're starting a category about female heroes in the Marvel Cinematic Universe (aka Earth-199999). So you create the category Female superheroes (Earth-199999) by adding the text:

Female superheroes of Earth-199999 came from every part of that Earth, exhibiting a wide range of powers, both meta—human and mortal. This category collects pages on this wiki about them, as well as many images and videos featuring their exploits.

Then you add it to Category:Earth-19999 and hit Publish.

This step is crucial, because once you publish a category page, it then will be usable by the category module. That is, it will appear as an auto-suggestion when you try to add it to other pages.

It will also be usable by all bots, DynamicPageList, the Help:Mobile Main Page, and other features.

Deleting a category =

To delete a category, first remove the category tag from all pages in the category as described above.

An admin can then delete any content on the category page itself by using the "Delete" option in the Edit menu dropdown, the same way a regular page is deleted.

A category page that has not been created will display the "Create" button in the top right corner of the page. In this case, the category listing can be deleted simply by removing it from all pages it was on. The category will then no longer appear in the list of categories (Special:Categories) and is fully deleted.

Category presentation

Category Gallery
  • By default, all categories on Fandom have a Category Gallery at the top of the category page itself. This shows a small image and link for each of the 8 most popular pages in that category. The image shown is usually the first image on each page.
  • If a page has no suitable graphics, then the first few lines of text will appear. Suitable images must be:
    • Larger than 130px by 115px
    • Used ten or fewer times on the wiki in content namespaces
    • Not an SVG
  • If you have a community where this display does not work well, you can add the magic word __NOCATEGORYGALLERY__ to the top of the page to remove it. You can also request that it be disabled on all pages through Special:Contact.
 
Category Exhibition
  • This is an optional display method for category pages. It can be turned on in your account preferences.
  • In the exhibition image mode, every page in the category is displayed as an image with a link. Images can be displayed in alphabetical or most visited order.
  • A small toggle option on the upper right of the page allows users to choose a "list" (lines) or image (squares) view.
  • In list mode, the category gallery appears above an alphabetical listing of all pages in the category.
CatExhibitionSample

A category with Category Exhibition enabled.

Further reading

Further help and feedback

Community content is available under CC-BY-SA unless otherwise noted.