Help:Categories

From NSDLWiki

Jump to: navigation, search

More info available wikipedia:Help:Category


To add an article to a category put the following at the end of the page you are editing...

[[Category:{Name}]]

where {Name} is the name of the category you want to add it to (but without the curly brackets {}). Any number of category tags may be added to the page - the page will be listed in all of them.

For example, you would replace {Name} with NSDL_Community or {Name} with Technology:

[[Category:NSDL_Community]] [[Category:Technology]]


You can also specify an additional {Sort} parameter that dictates where the page will appear, alphabetically, within the category. This is achieved by using the following markup:

[[Category:{Name}|{Sort}]]

So for example, to add this page to the 'Help' category, you would use:

[[Category:Help|Categories]]

Note that we used 'Categories' as the sort parameter. Without this the page would be listed under 'H' for 'Help:Categories', [[:Category:Help]] instead of under 'C', which is more useful. Other situations where you might want to use the sort parameter is when you have articles about people that are titled as FirstName LastName but within the category you want them listed as LastName, FirstName.

Another way to sort the article in the correct letter without the namespace is

[[Category:Help|{{PAGENAME}}]]

This is extremely helpful when using templates which include a category tag.


SubCategories

If you add a category to a Category:NAME page, it will automatically become a subcategory.

For example:

If I add Category:Science to Category:Biology page. The Category:Biology becomes a subcategory of Category:Science

Linking to Category Pages

To create a link to a category page:

[[:Category:{name}]]

If you were linking to the Category Page for Help on MediaWiki, the link would look like this: Category:Help

If you want to display alternate text for the link:

[[:Category:{name}|{alternate text}]]

Here is an example of the same link to the Category Page for Help on MediaWiki as above, but with alternative text: MediaWiki Help Index

Note: the {sort} parameter does not affect how the page title is displayed within the category listing, just how it is ordered. In the above example, the link to this page will still be 'Help:Categories', and not 'Categories' as you might expect!

Personal tools