Difference between revisions of "Help:Introduction to Categories"

From Computer History Wiki
Jump to: navigation, search
(New page: '''Categories''' are an excellent way to arrange various articles in a way which makes them accessible and well-arranged. ==Syntax== To add an article to a category, simply put <tt><nowi...)
 
(Syntax: clarifications)
Line 3: Line 3:
 
==Syntax==
 
==Syntax==
  
To add an article to a category, simply put <tt><nowiki>[[Category:Category name]]</nowiki></tt> in an article. (Convention dictates that this be at the bottom of the article, but it could in princible be anywhere). This creates the category if it did not already exist. However, since the category is empty of any descriptive text in the article, it will still appear as a red link until there is text in the category.
+
To add an article to a category, simply put <tt><nowiki>[[Category:Category name]]</nowiki></tt> in an article. (Convention dictates that this be at the bottom of the article, but it could in princible be anywhere). This creates the category if it did not already exist.
  
To arrange a subcategory of a category, simply place the subcategory in the parent category as you would place an article in a category. The subcategory will automatically be placed in the parent category.
+
However, since the category is empty of any descriptive text in the article, it will still appear as a red link until there is text in the category's page (which you can edit as you would a regular article).
 +
 
 +
To arrange a sub=category of a category, simply edit the sub-category's page to place the sub-category in the parent category, just as you would to place an article in a category. The sub-category will automatically be placed in the parent category.
  
 
To link to a category without placing the article in this category, prepend a colon to the link, as so: <tt><nowiki>[[:Category:Category name]]</nowiki></tt>
 
To link to a category without placing the article in this category, prepend a colon to the link, as so: <tt><nowiki>[[:Category:Category name]]</nowiki></tt>

Revision as of 13:58, 9 February 2018

Categories are an excellent way to arrange various articles in a way which makes them accessible and well-arranged.

Syntax

To add an article to a category, simply put [[Category:Category name]] in an article. (Convention dictates that this be at the bottom of the article, but it could in princible be anywhere). This creates the category if it did not already exist.

However, since the category is empty of any descriptive text in the article, it will still appear as a red link until there is text in the category's page (which you can edit as you would a regular article).

To arrange a sub=category of a category, simply edit the sub-category's page to place the sub-category in the parent category, just as you would to place an article in a category. The sub-category will automatically be placed in the parent category.

To link to a category without placing the article in this category, prepend a colon to the link, as so: [[:Category:Category name]]