Difference between revisions of "Help:Categories"

From OutHistory
Jump to navigationJump to search
m
 
(31 intermediate revisions by 5 users not shown)
Line 1: Line 1:
A '''category''' is a software feature of MediaWiki. Categories provide automatic indexes that are useful as tables of contents.
+
Adapted from Wikipedia by Jonathan Ned Katz, Director, OutHistory.org<ref>See: [http://en.wikipedia.org/wiki/Wikipedia:FAQ/Categories About Wikipedia Categories];
 +
[http://en.wikipedia.org/wiki/Wikipedia:Categorization Wikipedia:Categorization];
 +
[http://en.wikipedia.org/wiki/Special:Categories Wikipedia: Special:Categories];
 +
[http://en.wikipedia.org/wiki/Folksonomy Wikipedia Folksonomy]</ref>
  
To add a page to a category for example, type:
 
  
  <nowiki>[[</nowiki>Category:Category name]]
 
  
To be specific, in order to add an article called "Albert Einstein" to the category "People", you would edit the article and add <tt><nowiki>[[</nowiki>Category:People]]</tt> into the page source somewhere. Exactly where doesn't matter, but the convention is to put it ''after'' the article text.
+
Categories are internal links that, after being added to entries, provide automatic content indexes that help users find the particular content categorized. A '''category''' is a feature of MediaWiki software.
  
A category page does not need to be created beforehand. Putting a category link in one of the articles will automatically create that category and display the page (or pages) that belongs to it. By looking at the very bottom of the any article, you can tell what categories it belongs to, if any. Categories, if they exist, are always displayed there. Although a category has multiple articles in it, it will appear as a red link when a description of the category page is empty. To make the category links appear blue (like existing articles), click on the category link to go to the category page and edit it to add a short description.
 
  
Categories can have sub-categories, meaning that you can put a category page inside of another category. Categories can be nested in multiple level in this fashion. For example "Social Sciences" category may contain a list of categories such as "Sociology", "History", etc... Only after clicking on one of them, you would get the list of articles in that particular sub-category.
 
  
For a complete list of categories, see [[Special:Categories]].
+
'''Category code and syntax'''
  
To link to a category page from the article text (without adding the page to the category) prefix the link name with a colon.  For example, <tt><nowiki>[[</nowiki>:Category:Out_and_Elected|Out and Elected category]]</tt> renders as [[:Category:Out_and_Elected|Out and Elected category]].
+
Categories use the following code and syntax: <nowiki>[[</nowiki>Category:Category name]]. You can do this by typing in the code yourself or by hitting the Category edit button on the tool bar (6th button from the right).
  
==Sort key==
 
Categories are listed in alphabetical order by default. If you want an item in a list to be positioned in that order, but according to an alternative name (sort key), use the following syntax:
 
  
<nowiki>[[</nowiki>Category:category name|sort key]]
+
For example, to add the category "Law" to an entry, Edit the entry and add <tt><nowiki>[[</nowiki>Category:Law]]</tt> to the page.
  
For example, to have Albert Einstein article sorted as "Einstein, Albert". You would type the following:
 
  
  <nowiki>[[Category:People|Einstein, Albert]]</nowiki>
 
  
==Singular or plural==
+
'''Location of category in entry'''
 +
 
 +
For the sake of regularity and by convention the category is placed at the very end of an article text.  Look at the very bottom of any entry to see what categories it contains, if any. Categories, if they exist, are always displayed in that location.
 +
 
 +
 
 +
 
 +
'''Alphabetical order'''
 +
 
 +
For the sake of clarity and regularity, categories are listed alphabetically and then numerically, in ascending order, from earliest to latest. 
 +
 
 +
 
 +
 
 +
'''Existing categories'''
 +
 
 +
For the sake of regularity, if an appropriate category already exists, use that category.  So, before you create a new category, see the list of basic established categories see [[Contents]].  For a complete list of categories, see [[Special:Categories]].
 +
 
 +
 
 +
To add an existing category to an entry, Edit that entry and write that category link at the very bottom of that entry. For example, add <nowiki>[[</nowiki>Category: 20th century]]. Be sure to match the capitalization of the existing category or you will inadvertently create a new category.
 +
 
 +
 
 +
 
 +
'''Creating new categories'''
 +
 
 +
To create a new category and add it to an entry, Edit that entry, write the new category link at the bottom of that entry, and Save. For example, add <nowiki>[[</nowiki>Category:New category name]]
 +
 
 +
 
 +
Putting a category link in an entry and saving that entry will automatically create that category and display the page (or pages) that belongs to it. A category page does not need to be created before the creation of a page.
 +
 
 +
 
 +
Although a category has multiple articles in it, it will appear as a red link when a description of the category page is empty.
 +
 
 +
 
 +
To make the category links appear blue (like existing articles), click on the category link to go to the category page and edit it to add a short description or sub-categorize it by addding one of the basic catgeories listed on the Contents page. For example,  <nowiki>[[</nowiki>Category:Places]].
 +
 
 +
 
 +
When creating new categories, follow the established conventions.
 +
 
 +
 
 +
 
 +
'''Category for a person'''
 +
 
 +
For example, to create a category for a person, use this format Category:Last Name, First Name (year of birth-year of death in the form (yyyy-yyyy).
 +
 
 +
After creating a category page for a person add <nowiki>[[</nowiki>Category:People]] to that page to have it appear in the complete People category Index.
 +
 
 +
 
 +
 
 +
'''Category for a city'''
 +
 
 +
For cities follow the format Category:State name-City.  Then add the Category:State name to the resulting page.
 +
 
 +
 
 +
For a category to work it must include the exact format, punctuation, and spacing. (When in doubt cut and paste an existing category).
 +
 
 +
 
 +
 
 +
'''Subcategories'''
 +
 
 +
Categories have sub-categories, meaning that you can put a category page inside of another category. Categories can be nested in multiple level in this fashion. For example the "Social Sciences" category may contain a list of categories such as "Sociology", "History", etc. That is how the People category is set up, each category for an individual is sub-categorized under People. It also allows categories to be listed under several higher categories for example the Category:Sodomy Law can go under both Category:Sodomy and Category:Law. For questions about how this functions, we suggest you look at how existing Categories have been set up.
 +
 
 +
 
 +
 
 +
== Linking to a Category Page ==
 +
 
 +
To link to a category page (without adding the page to the category), include a colon before the complete Category page name.  For example, <tt><nowiki>[[</nowiki>:Category:People]]</tt> renders as [[:Category:People]].
 +
 
  
It is not obvious whether a page like Amsterdam should be in category City (a description of a member of the category) or Cities (a description of the category as a set of pages). A convention for using one or the other is useful and should be codified. (Here is [http://en.wikipedia.org/wiki/Wikipedia:Naming_conventions_%28categories%29#Special_conventions_for_lists_of_items Wikipedia's convention]). Sticking to the convention will help to avoid having both categories, with part of the pages in one, and part in the other.
 
  
 
==Moving a category page==
 
==Moving a category page==
Line 32: Line 91:
 
The only way to move a category page is to manually change all category tags that link to the category, and copy the editable part. There is no automatic way to move a category page in the way one moves an article page.
 
The only way to move a category page is to manually change all category tags that link to the category, and copy the editable part. There is no automatic way to move a category page in the way one moves an article page.
  
==More==
 
  
[http://en.wikipedia.org/w/index.php?title=Help:Category&action=submit Wikipedia's Category Help].
+
==References==
 +
<references/>
 +
 
 +
 
 +
==Categories==
 +
[[Category:Help Pages]]

Latest revision as of 09:30, 15 June 2009

Adapted from Wikipedia by Jonathan Ned Katz, Director, OutHistory.org[1]


Categories are internal links that, after being added to entries, provide automatic content indexes that help users find the particular content categorized. A category is a feature of MediaWiki software.


Category code and syntax

Categories use the following code and syntax: [[Category:Category name]]. You can do this by typing in the code yourself or by hitting the Category edit button on the tool bar (6th button from the right).


For example, to add the category "Law" to an entry, Edit the entry and add [[Category:Law]] to the page.


Location of category in entry

For the sake of regularity and by convention the category is placed at the very end of an article text. Look at the very bottom of any entry to see what categories it contains, if any. Categories, if they exist, are always displayed in that location.


Alphabetical order

For the sake of clarity and regularity, categories are listed alphabetically and then numerically, in ascending order, from earliest to latest.


Existing categories

For the sake of regularity, if an appropriate category already exists, use that category. So, before you create a new category, see the list of basic established categories see Contents. For a complete list of categories, see Special:Categories.


To add an existing category to an entry, Edit that entry and write that category link at the very bottom of that entry. For example, add [[Category: 20th century]]. Be sure to match the capitalization of the existing category or you will inadvertently create a new category.


Creating new categories

To create a new category and add it to an entry, Edit that entry, write the new category link at the bottom of that entry, and Save. For example, add [[Category:New category name]]


Putting a category link in an entry and saving that entry will automatically create that category and display the page (or pages) that belongs to it. A category page does not need to be created before the creation of a page.


Although a category has multiple articles in it, it will appear as a red link when a description of the category page is empty.


To make the category links appear blue (like existing articles), click on the category link to go to the category page and edit it to add a short description or sub-categorize it by addding one of the basic catgeories listed on the Contents page. For example, [[Category:Places]].


When creating new categories, follow the established conventions.


Category for a person

For example, to create a category for a person, use this format Category:Last Name, First Name (year of birth-year of death in the form (yyyy-yyyy).

After creating a category page for a person add [[Category:People]] to that page to have it appear in the complete People category Index.


Category for a city

For cities follow the format Category:State name-City. Then add the Category:State name to the resulting page.


For a category to work it must include the exact format, punctuation, and spacing. (When in doubt cut and paste an existing category).


Subcategories

Categories have sub-categories, meaning that you can put a category page inside of another category. Categories can be nested in multiple level in this fashion. For example the "Social Sciences" category may contain a list of categories such as "Sociology", "History", etc. That is how the People category is set up, each category for an individual is sub-categorized under People. It also allows categories to be listed under several higher categories for example the Category:Sodomy Law can go under both Category:Sodomy and Category:Law. For questions about how this functions, we suggest you look at how existing Categories have been set up.


Linking to a Category Page

To link to a category page (without adding the page to the category), include a colon before the complete Category page name. For example, [[:Category:People]] renders as Category:People.


Moving a category page

The only way to move a category page is to manually change all category tags that link to the category, and copy the editable part. There is no automatic way to move a category page in the way one moves an article page.


References


Categories