Categorizing pages
From Gumnickopedia
|
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.
[edit] 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 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 [edit] Categorizing TemplatesYou 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. |
[edit] Category IndicesThe 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:
[edit] Categorizing CategoriesYou 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 |
Categories: Authoring | Editing | Help | Reference | Site Management

