Using Categories: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
No edit summary
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Overview =
{{breadcrumb|Wiki}}
* Categories allow related pages to be grouped together easily. For example, if you have pages A, B, C and D, you could link A to B, C and D, and link B to A, C and D, and link C to A, B and D, and link D to A, B and C... or you could link A to category X, B to category X, C to category X and D to category X.
 
* The more related pages in a category, the better this works.
'''Note:''' Need to add [[Subcategories]] to this page - which are nested categories within categories.
= Categorizing a new page =
 
* First, see if there is an [[:Special:Categories|existing category]] for the page.
'''Categories''' are tags that index all pages marked with that tag on the same page. All pages marked with a particular category can be seen on one page. See [[:Category: Wiki]] for an example where all the pages tagged with the Wiki category are then indexed on one page. This makes it easier for people to find content related to a topic or category.
* If so, create a link to the category at the bottom of the page. For example, this page is about using the wiki, so it belongs in the Wiki category:
 
= Categorizing pages =
 
Categorize pages using the [[Template: Listofcategories|official list of categories]]. Stick to these categories where possible; don't create new categories unless there is a real need.
 
Categorize pages by placing the [[Template: Breadcrumb|Breadcrumb]] template at the top and passing the category name as parameter. At the top of a page about beekeeping, you would write:
 
<pre>
<pre>
[[Category:Wiki]]
{{Breadcrumb|Food and Agriculture|Beekeeping}}
</pre>
</pre>
* If a category belongs in more than one category, create a link for each category.


= Creating a new category =
This will do two things:
* If no existing category really fits, make up a new category and create the link:
 
* insert a navigation menu at the top, and
* put the page in the appropriate wiki category
 
If there are other categories that a page could belong to, just add them at the bottom of the page as such: <pre>[[Category: Category name]]</pre>
 
= Linking to a category page =
 
To link to a category page, prepend a colon so that the parser sees a link instead of a categorization. For example, writing
 
<pre>
<pre>
[[Category:Cetaceans]]
[[:Category: Wiki]]
</pre>
</pre>
* Click on the category link and edit the category page.
 
** Describe what belongs in the category.  Example:
will produce the following: [[:Category: Wiki]]
 
To change the appearance of a category link, append a vertical bar and the desired text to display, as such:
 
<pre>
<pre>
Whales, dolphins and related mammals.
[[:Category: Wiki|new text]]
</pre>
</pre>
** If there's something similar that really belongs in a different but related category, point that out and link to the related category.  Example:
 
<pre>
This would yield the following: [[:Category: Wiki|new text]]
Seals and walruses are listed under [[:Category:Pinnipeds|Pinnipeds]].
 
</pre>
= Style conventions =
** If the category belongs to a larger category (for example, Cetaceans are aquatic mammals), create a link to the larger category:
 
<pre>
''Always'' put a space after every instance of '''Category:''' so that keyboard traversal is kept easy.
[[Category:Aquatic mammals]]
 
</pre>
= Maintenance =
= Linking to a category page ==
 
* To link to the Wiki category page, prepend a colon so that the parser sees a link ([[:Category:Wiki]]) instead of a categorization:
The following pages help in the maintenance of categories.
<pre>
 
[[:Category:Wiki]]
* [[:Special:Categories|List of all categories]]
</pre>
* [[:Special:UncategorizedPages|Pages without categories]]
* To change the appearance of a category link, append a vertical bar and the desired text to display ([[:Category:Wiki|Style guide]]):
* [[:Special:UnusedCategories|Categories without pages]]
<pre>
* [[:Special:UncategorizedCategories|Categories without categories]]
[[:Category:Wiki|Style guide]]
 
</pre>
= See also =
= Refactoring categories =
* [http://www.mediawiki.org/wiki/Help:Categories MediaWiki help on Categories]
* These pages will assist:
 
** [[:Special:Categories|List of all categories]]
** [[:Special:UncategorizedPages|Pages without categories]]
** [[:Special:UnusedCategores|Categories without pages]]
** [[:Special:UncategorizedCategories|Categories without categories]]
= See also: =
[[Category:Wiki]]
[[Category:Wiki]]

Latest revision as of 20:24, 6 December 2015

Main > Wiki


Note: Need to add Subcategories to this page - which are nested categories within categories.

Categories are tags that index all pages marked with that tag on the same page. All pages marked with a particular category can be seen on one page. See Category: Wiki for an example where all the pages tagged with the Wiki category are then indexed on one page. This makes it easier for people to find content related to a topic or category.

Categorizing pages

Categorize pages using the official list of categories. Stick to these categories where possible; don't create new categories unless there is a real need.

Categorize pages by placing the Breadcrumb template at the top and passing the category name as parameter. At the top of a page about beekeeping, you would write:

{{Breadcrumb|Food and Agriculture|Beekeeping}}

This will do two things:

  • insert a navigation menu at the top, and
  • put the page in the appropriate wiki category

If there are other categories that a page could belong to, just add them at the bottom of the page as such:

[[Category: Category name]]

Linking to a category page

To link to a category page, prepend a colon so that the parser sees a link instead of a categorization. For example, writing

[[:Category: Wiki]]

will produce the following: Category: Wiki

To change the appearance of a category link, append a vertical bar and the desired text to display, as such:

[[:Category: Wiki|new text]]

This would yield the following: new text

Style conventions

Always put a space after every instance of Category: so that keyboard traversal is kept easy.

Maintenance

The following pages help in the maintenance of categories.

See also