Help:How to add categories

Help page

Categories are a useful way of browsing content and related articles that would otherwise be difficult to perform without them. Pages and media files can be categorised with one or more categories. These are usually added at the bottom of the page during creation and when saved provide the user with a horizontal list of links to category pages. These category pages, depending on what is linked to them, may contain links to pages, other categories and a gallery of files. For those new to this software, all will become clear.

Definitions

Let’s start with some definitions of what the main elements of the category structure are.

  • Category – A feature that allows for "tagging" something
  • Category link – Clickable text that links to a category page
  • Category page – Page with list of sub-categories, (article) pages and gallery
  • Sub-category – Clickable text that links to another category page
  • Pages – Clickable text that links to pages (articles)
  • Gallery – Clickable thumbnail images that link to file pages
  • Category namespace – The assigned place for categories using the Category: prefix

Clickable text links can be blue or red. Blue denotes the page exists, whereas red means that the page does not exist. Clicking on a red link will take you to the edit screen to create the new page.

What is on a category page?

11th Battalion (Lonsdale)(16 C, 5 P, 17 F)
Document library(6 C, 64 P, 2 F)
Newspaper articles(7 C, 90 P, 3 F)
Officers (11th Battalion)(16 P, 82 F)
On this day(2 C, 2 P)
Publications(4 C, 9 P)
Quotes(5 P)
Roll of Honour(36 C, 784 P)

A category page is a type of page that serves a specific function, in this case to provide the user with an auto-generated alphabetised list of links and thumbnail images. Category pages contain two parts:

The upper part is the editable area of the page where you can include your own text and images like any other standard page.
The lower part is the auto-generated area of the page that lists the categories, pages and gallery. These are updated in real time.

Category pages can also include other categories themselves. These will then show up as sub-categories. An example of this is shown here where you will see that the top-level category The Lonsdale Battalion has multiple other sub-categories, each of which may also contain sub-categories, such as Roll of Honour, which itself has several sub-categories. There is generally no limit as to how many parent and child categories there are, which allows for better categorising of multiple subjects within a single subject.

A good category structure should allow for easy navigable browsing. All articles and categories should be accessible from these categories. The number of included categories (C), pages (P) and files (F) are indicated in brackets.

Create a new category

New categories can be created in two different ways. The first is by typing the name of a category in the search bar, the second is by adding it to the bottom of a page. Whilst both methods achieve exactly the same result, it is entirely up to the personal preference of the user on how they create it.

Search bar method

This is the quickest and easiest way of creating a new category. Type the name of the category you want to create in the search bar and press enter. Be sure to include the Category: namespace prefix otherwise you’ll just be creating an article page. So, if you want to create a category called Lonsdale Pals, you would type Category:Lonsdale Pals in the search bar. The red link that appears in the search results is the direct link to that category page. This can now be created by clicking on it.

Page editor method

This method allows a user to add one or more categories to the bottom of the page in the edit screen. This is done by using square parentheses [[ ]] with the Category prefix, followed by a colon and the name of the category like this [[Category:Category name]]

When the edit page is previewed or saved the link will show red like this Category:Category name. This is how you know a category page does not yet exist. Clicking on the red link will allow the user to create a new category page. You can add text if you wish (this appears in the upper part of the page) but this is not always required.

To ensure that the category you are creating appears in the category structure it must be included in another parent category. Simply add the parent category wikitext as above and it will be included in the category structure.

Assign a page to a category

This is exactly the same way as creating a new category.

If you add a category link to a page → The software assigns that page to a category.

Assigning a page to a category is done by adding the name of a category to the bottom of the page (article) you are working on with the same method mentioned above.

For example typing [[Category:The Lonsdale Battalion]] will generate a link automatically at the bottom of the page.

When clicking on the category link, it will take you to the category page. The page you just edited will show up in the alphabetised list. The same goes for file pages too, where a thumbnail image is shown in a gallery at the lower part of the category page.

Linking to a category page

If you want to link to a category page within a body of text, prepend the category link with a colon (:)

[[:Category:The Lonsdale Battalion]] will render like this Category:The Lonsdale Battalion

To change the link text, write the text inside the link after a pipe (|), so typing this:

[[:Category:The Lonsdale Battalion|Learn more about the Lonsdale Battalion]] will render as Learn more about the Lonsdale Battalion

Additional functions

Categories do have greater functionality but for the first-time or casual user, the above guide should be enough to perform the essential tasks. These additional functions are, for the most part, not really a fundamental requirement for this site. However, some of these functions may be used by Borderman for administrative purposes such as hidden categories, tracking categories, redirecting categories and templates with categories. These are used to ensure a better user experience. Users with an existing knowledge of the Mediawiki software will be aware of these functions and can provide assistance if needed.

Mediawiki has a dedicated help page for categories, providing further detail into the broader functionality of categories. But for the purpose of this guide, it's best to keep things a little more straightforward.

Category lists

For a complete list of all categories which have at least one page, see Special:Categories.

For a complete list of all created/edited categories, including the ones that don't have any pages, see Special:Allpages/Category: (note the colon at the end).

Cookies help us deliver our services. By using our services, you agree to our use of cookies.