Categories & Sub-Categories

Contents

[edit] What Are Categories

In short, they are exactly what they are called. It allows you to define the page as a category, and adds it to a relevant 'index'.

For example if you go to this page, you'll notice at the bottom it has a list of categories like so:

Categories: Stargate SG-1 | Stargate Atlantis | Characters

[edit] Why Add Categories

Clicking on 'Categories' gives you a list of all the Categories on the Wiki. Clicking on 'Stargate SG-1' gives you a list of all things Stargate SG1 currently added to the Wiki, and the same is true for Stargate Atlantis, and the Characters is essentially a list of Characters. Each of these is done Alphabetically which makes it much easier to navigate. The best thing is that, you can then refer to this page as an 'index' for all the Characters, or in the case of the Stargate SG-1 and Atlantis page, as an 'index' of all things SG1/Atlantis respectively.

[edit] How Do I Add Categories

Simply add

    [[Category:$CATEGORY_NAME]]

anywhere in the page (preferably the top, for easier editing) and it will essentially add that page to the appropriate category.

You can add multiple categories by simply writing them one after the other like so:

    [[Category:$CATEGORY_NAME_1]][[Category:$CATEGORY_NAME_2]][[Category:$CATEGORY_NAME_3]]

So for the page I linked to before, the code is:

    [[Category:Stargate SG-1]][[Category:Stargate Atlantis]][[Category:Characters]]

Sweet and simple.

[edit] How Do I Link To Categories

Linking to them is just as simple, simply add a colon before the word 'Category' like so:

    [[:Category:$CATEGORY_NAME|$LINKNAME]]

If you don't add the Link name, it will simply use Category:Category Name as the link name, and I'm sure you don't want the word 'category' when linking.

[edit] How To Add A Sub-Category

Sub Categories can be quite beneficial, and for an example of one, you don't need to go further than this page.

As you can see that page has a couple of 'Sub-cats' namely the Bestiary for FFXII and the Characters page. You can see that as the main index for the game, it can be very beneficial and is essentially a way of filtering content to say 'just characters'.

Adding sub categories, is pretty much the same as adding Categories, all you need to do is add the MAIN category as a Category to the Category that you want to be a Sub Category (confusing right? let me give you an example)...

I want Bestiary (FFXII) to be a Sub Category for Final Fantasy XII, so all I need to do is add

    [[Category:Final Fantasy XII]]

to the Bestiary (FFXII) Category. This will add the Bestiary Cat as a sub-cat to FFXII. Easy as that.

Last edited by Krunal on 9 February 2009 at 10:18
This page has been accessed 910 times.