Categorizing pages

From Gumnickopedia

Jump to: navigation, search

Categorizing pages and images is a simple way to help site visitors find related items. On any page that’s been marked as belonging to one or more categories, you’ll see a bar across the bottom of the page listing its categories. Click on any of the category names to see an index of other items in the same category.

Contents

Categoring Articles (Regular Pages)

A page can belong to any number of categories, and any author/editor can set up new categories by adding the code [[Category:New Category Name]] at the end of the page’s text.

Many of the pages and images in Gumnickopedia have already been categorized, but feel free to add more category codes whenever you think of additional categories to which an item belongs.

Please check the list of existing categories to see if the category you want already exists before you set up any new ones.

You can tag any page as belonging to one or more categories by adding category codes to the end of the page text. For example, a page about Beth and Rich’s wedding might be tagged like this:

<!--
Please leave the following code, along with this comment, 
at the bottom of anything you add to this page. Feel free 
to define this page as belong to additional categories as 
you see fit.
-->

[[Category:Beth]]
[[Category:Rich]]
[[Category:Events]]
[[Category:Weddings]]
etc.

The comment (everything from the <!-- to the -->) isn’t required, but should be included as a courtesy to other author/editors.

Categorizing Templates

You can put templates in categories too, but keep in mind that any category tag on the template will get passed through to any page on which you use that template. There’s a workaround, however, if you want a template to show up in a category, but you don’t want the page listed there. For example, we want all the templates in the Templates category, but not the resulting pages. Here’s the code to use on the template:

<noinclude>[[Category:Templates]]</noinclude>

This gives the result of listing the template in the Templates category, but not pages based on the template. Conversely, if you want to include category tags as part of a template, but you don’t want the template itself listed in the category or categories, code them like this:

<includeonly>[[Category:Name]]</includeonly>

For example, pages based on the {{Events}} template should go in the Events category, but the template itself shouldn’t. So we code the template like this:

<includeonly>[[Category:Events]]</includeonly>

Now any page that uses the template gets listed in the Events category, but the template itself doesn’t.

 


Categorizing Photos

I generally tag photos as belonging first to the category “Photos,” and then to categories for the various people in the photo, plus any other categories to which those people belong. For example, a photo of Beth, Rich, and Bob might be tagged like this:

[[Category:Photos]]
[[Category:Beth]]
[[Category:Rich]]
[[Category:Bob]]
[[Category:Joneses]]
[[Category:Swansons]]
etc.

There are also some categories for special kinds of pictures:

[[Category:Baby pix]]
[[Category:Group shots]]
[[Category:School pix]]
etc.

A listing of subcategories of the category “Photos” can be found here.

Category Indices

The Wiki software automagically generates an index for every category that contains pages and/or images (“members,” in Wikispeak). (Click on any of the category names at the foot of this page to see an example.) You can add optional introductory text to those pages. I’ve set up a template that plugs in standard instructions for adding an item to the category in question. The code looks like this:

{{CatHeader|
|category_name=Widgets
}}

which produces this output:

This page lists all of the pages or images that have been tagged as belonging to the category “Widgets.” You can tag any page or image as belonging to this category by including the following code in the page text:
[[Category:Widgets]]
For complete instructions, see Categorizing pages.

Categorizing Categories

You can make any category a subcategory of another one by tagging the category index page as belonging to that category. For instance, “Baby pix” is a subcategory of Photos because the category index page for “Baby pix” has been tagged with [[Category:Photos]]. (Click the link to see what I’m talking about.)

Personal tools