Using Categories: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
(Created page with '= Overview = 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...')
 
No edit summary
 
(15 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.
 
'''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 [[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>
{{Breadcrumb|Food and Agriculture|Beekeeping}}
</pre>
 
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: <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>
[[:Category: Wiki]]
</pre>
 
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:


= Categorizing a new page =
* First, see if there is an [[:Special:Categories|existing category]] for the page
* If so, create a link to the category.  For example, this page is about using the wiki, so it belongs in the Wiki category:
<pre>
<pre>
[[Category:Wiki]]
[[:Category: Wiki|new text]]
</pre>
</pre>
= Creating a new category =
= Linking to a category page ==
----


Categories allow you to perform automatic indexing of a number of pages in an alphabetical index listed under the Category page. To start a Category page:
This would yield the following: [[:Category: Wiki|new text]]
 
= Style conventions =
 
''Always'' put a space after every instance of '''Category:''' so that keyboard traversal is kept easy.


Type ''title=Category:Category Name'' instead of just typing a title as above. For example, http://openfarmtech.org/index.php?title=Category:Water . Then, if you embed the construction:
= Maintenance =


[[Image:Filename.jpg]]
The following pages help in the maintenance of categories.


on any page, that page will be listed in an alphabetical index under your category page. This tool is very useful for indexing a large number of related pages, without having to link to all these pages.
* [[:Special:Categories|List of all categories]]
* [[:Special:UncategorizedPages|Pages without categories]]
* [[:Special:UnusedCategories|Categories without pages]]
* [[:Special:UncategorizedCategories|Categories without categories]]


= See also =
* [http://www.mediawiki.org/wiki/Help:Categories MediaWiki help on 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