Template:Category/doc

From MozillaWiki
Jump to: navigation, search
Edit-copy green.svg
This is a documentation subpage for Template:Category.
It contains usage information, categories and other content that is not part of the original template page.

Usage

This template produces a link to a category. It's meant to be an easier way to link to categories.

The current syntax for creating a link to a category, [[:Category:Category Name]], is confusingly similar to the syntax for adding a page to a category, [[Category:Category Name]] (only a single colon character differs).

Parameters

The syntax for {{category}} is {{category|category name|link text}}, where

  • category name is the name of the category to which you want to link.
  • link text is an alternative text for the link, that is displayed instead of the standard output "Category:Category name".

NB! The template automatically includes the preceding namespace, "Category:". Hence, if you, as an example, want to link to a category called Mozilla, you just enter "Mozilla".

Examples

If the resulting link is displayed in red, it means that the category you wished to link to doesn't exist yet. Click the link to go to the page for creating that category.

See also

  • {{c}} – same function as this template, but without the option to add a custom link text.