Difference between revisions of "Help:Categories"
m (→How to use) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 21: | Line 21: | ||
==HotCat== | ==HotCat== | ||
===How to use=== | ===How to use=== | ||
Whenever a page is loaded, HotCat looks for the category bar. If there are visible categories, it adds links to easily remove, change or add categories | Whenever a page is loaded, HotCat looks for the category bar. If there are visible categories, it adds links to easily remove, change or add categories. | ||
The new links are: | The new links are: | ||
Line 51: | Line 49: | ||
=== Input box === | === Input box === | ||
The input box of HotCat is very simple: a text field to enter the new category name, an indicator icon, and an "OK" and a "Cancel" button. | The input box of HotCat is very simple: a text field to enter the new category name, an indicator icon, and an "OK" and a "Cancel" button. | ||
The indicator icon tells you whether or not the category name you've entered exists. A | The indicator icon tells you whether or not the category name you've entered exists. A "X" icon means that there is no such category yet. You can still add the category, but it will show up as a red link, and you should, after having added the category, click that red link and enter a brief description and parent categories to this new category. A "Checked" icon shows that there already is a category with the name you've entered. | ||
When you start typing, HotCat will display a list of suggestions above or below the text input field. Clicking one of these suggestions will copy it into the text field. Double-clicking a suggestion is the same as clicking once and then clicking the "OK" button: HotCat will add the double-clicked suggestion automatically. The suggestion list is populated by the [[#Search engines|search engine]] chosen in the selector between the list and the text input field. | When you start typing, HotCat will display a list of suggestions above or below the text input field. Clicking one of these suggestions will copy it into the text field. Double-clicking a suggestion is the same as clicking once and then clicking the "OK" button: HotCat will add the double-clicked suggestion automatically. The suggestion list is populated by the [[#Search engines|search engine]] chosen in the selector between the list and the text input field. | ||
In the example shown here, we've entered "Alps of", and HotCat presents us with a list of possible completions. The first suggestion has already been copied into the text box, but the added text is selected, so that it will be overwritten when we keep on typing. Entering " S" reduces the suggestion list accordingly. | In the example shown here, we've entered "Alps of", and HotCat presents us with a list of possible completions. The first suggestion has already been copied into the text box, but the added text is selected, so that it will be overwritten when we keep on typing. Entering " S" reduces the suggestion list accordingly. | ||
Line 68: | Line 63: | ||
=== Making more than one category change === | === Making more than one category change === | ||
The user interface of HotCat is minimalistic on purpose and geared towards making interactions simple and fast. When you just click on a "(-)" link to remove a category, the edit is executed right away, and likewise when you submit a single category addition or change. | The user interface of HotCat is minimalistic on purpose and geared towards making interactions simple and fast. When you just click on a "(-)" link to remove a category, the edit is executed right away, and likewise when you submit a single category addition or change. | ||
Still HotCat fully supports changing more than one category at once. If you click the "(+<sup>+</sup>)" link at the beginning of the category line, HotCat will enter its multi-change mode. The "(+<sup>+</sup>)" link is replaced by a "save" button, and all changes you make from now on will be written to the page only when that button is clicked. Initially, this button may appear disabled. It is enabled only when there are indeed category changes that need saving. | Still HotCat fully supports changing more than one category at once. If you click the "(+<sup>+</sup>)" link at the beginning of the category line, HotCat will enter its multi-change mode. The "(+<sup>+</sup>)" link is replaced by a "save" button, and all changes you make from now on will be written to the page only when that button is clicked. Initially, this button may appear disabled. It is enabled only when there are indeed category changes that need saving. | ||
This multi-change mode is also entered automatically if you have one category input box open and, while it is still open, add, change, or remove another category. | This multi-change mode is also entered automatically if you have one category input box open and, while it is still open, add, change, or remove another category. | ||
Line 82: | Line 74: | ||
Note that while HotCat normally automatically submits single category changes, it will never do so when operating in multi-change mode. It will always open a screen showing the changes made, which you should review before submitting the edit manually. | Note that while HotCat normally automatically submits single category changes, it will never do so when operating in multi-change mode. It will always open a screen showing the changes made, which you should review before submitting the edit manually. | ||
==More== | ==More== |
Latest revision as of 16:20, 12 January 2012
MediaWiki allows you to categorize pages and files by appending one or more Category tags to the content text. Adding these tags creates links at the bottom of the page that take you to the list of all pages in that category, which makes it easy to browse related articles.
Wiki Markup[edit]
Add a page to a category[edit]
To add a page or uploaded file to a category, simply edit the page and add the following text (where NAME is the name of the category you want to add it to).
[[Category:NAME]]
Any number of Category tags may be added to the page and the page will be listed in all of them. Category tags can be added wherever you like in the editing text, but they are usually added at the very bottom for the convenience of other editors.
If categories are placed into a section of text by themselves, any nearby excess whitespace will be ignored. If placed between a list and regular text, you will need to manually add the <br /> linebreak.
Adding Category tags to categories will make them subcategories. It is a good idea to organize all your categories into a hierarchy with a single top level category.
Sort key[edit]
A sort key specifies where the page will appear in the category list, and under which letter heading. (By default, the page is sorted under the first letter of its full name including its namespace.) You can add a sort key to a page by adding it inside the Category tag. For example, the tag below will add the page under the heading "S".
[[Category:NAME|SORT]]
Sort keys are case-sensitive, and a space is also valid. The order of the sections within a category follows the Unicode sort order. The sort key does not change the page title displayed in the category.
HotCat[edit]
How to use[edit]
Whenever a page is loaded, HotCat looks for the category bar. If there are visible categories, it adds links to easily remove, change or add categories.
The new links are:
- "(-)" after a category: when clicked, the category is automatically removed.
- "(±)" after a category: when clicked, an input field to change this category is opened.
- "(+)" at the end of the list of categories: when clicked, an input field to add a category is opened.
- "(++)" at the front: when clicked, enters multi-change mode, allowing modifying more than one category.
If HotCat can detect that a certain category is not in the page text itself but was transcluded onto the page from a template or other transclusion, it will not add these links. Only categories that are present in the wikitext of the page itself can be modified through HotCat.
Removing a single category[edit]
To remove a category, simply click the "(-)"-Link next to the category name. If the page does indeed contain this category, HotCat will remove it automatically. It will
- open a new window or tab in your browser with the current page opened for editing,
- hide the whole edit form, so that you cannot edit,
- edit the page to remove the category, and
- save the page.
Changing a category[edit]
To change a category, click the "(±)"-Link next to the category name. This will open the input box where you can enter a new category name.
Adding a category[edit]
To add a category, click the "(+)"-Link at the end of the category line. This will open the input box where you can enter a new category name.
Input box[edit]
The input box of HotCat is very simple: a text field to enter the new category name, an indicator icon, and an "OK" and a "Cancel" button.
The indicator icon tells you whether or not the category name you've entered exists. A "X" icon means that there is no such category yet. You can still add the category, but it will show up as a red link, and you should, after having added the category, click that red link and enter a brief description and parent categories to this new category. A "Checked" icon shows that there already is a category with the name you've entered.
When you start typing, HotCat will display a list of suggestions above or below the text input field. Clicking one of these suggestions will copy it into the text field. Double-clicking a suggestion is the same as clicking once and then clicking the "OK" button: HotCat will add the double-clicked suggestion automatically. The suggestion list is populated by the search engine chosen in the selector between the list and the text input field.
In the example shown here, we've entered "Alps of", and HotCat presents us with a list of possible completions. The first suggestion has already been copied into the text box, but the added text is selected, so that it will be overwritten when we keep on typing. Entering " S" reduces the suggestion list accordingly.
Clicking on "Alps of Switzerland" will then copy that into the text field and close the suggestion list (since there are no more suggestions, i.e., categories beginning with "Alps of Switzerland" as a prefix).
Clicking the "Cancel"-button would now abort the operation, clicking "OK" would tell HotCat to go on and add the chosen category.
Making more than one category change[edit]
The user interface of HotCat is minimalistic on purpose and geared towards making interactions simple and fast. When you just click on a "(-)" link to remove a category, the edit is executed right away, and likewise when you submit a single category addition or change.
Still HotCat fully supports changing more than one category at once. If you click the "(++)" link at the beginning of the category line, HotCat will enter its multi-change mode. The "(++)" link is replaced by a "save" button, and all changes you make from now on will be written to the page only when that button is clicked. Initially, this button may appear disabled. It is enabled only when there are indeed category changes that need saving.
This multi-change mode is also entered automatically if you have one category input box open and, while it is still open, add, change, or remove another category.
In multi-change mode, submitting a category change or removal will not perform the edit immediately. Instead, the change will only be reflected on the screen, allowing you to make more category changes. HotCat will add "(×)" links after each changed category. This is an "undo" link; it'll undo the last action on that category. Category removals are indicated by striking through the category name. HotCat will also highlight unsaved category changes by changing the background of the category link.
Once the "Save" button is clicked, HotCat will make all the changes, and then opens the page in an edit screen, showing the changes made. The changes are at that point not yet saved! Review the changes to make sure that the script did what you intended it to do, and then submit the edit like any other edit you'd make.
Note that while HotCat normally automatically submits single category changes, it will never do so when operating in multi-change mode. It will always open a screen showing the changes made, which you should review before submitting the edit manually.
More[edit]
Create a category[edit]
A category can be created the same way as as other wiki pages (See Help:Starting a new page); just add "Category:
" before the page title. (Category lists exist even if their description page is not created, but these categories are isolated from others and serve little purpose for organization or navigation.)
It is not possible to rename (move) a category, unlike other wiki pages. It is necessary to create a new category and change the Category tag on every page. The new category will not have the older category's page history, which is undesirable if there are many revisions.
To avoid extra work, try searching within your wiki before creating a new category. The list of all categories can be found in "special pages" in the "tools" box of the sidebar.
Hidden categories[edit]
The categories that a page is in are normally listed at the bottom of the page. A category can be hidden from these lists by adding "__HIDDENCAT__
" to the category page. (Each user can choose to see them in a separate "Hidden categories" list, by checking "Show hidden categories" in the "Misc" section of Special:Preferences.)
Hidden categories are automatically added to Category:Hidden categories (specified by MediaWiki:Hidden-category-category).
Linking to a category[edit]
To create a link to a category, use a leading colon before the category name. (Without this colon, it will add the current page to the category.) To change the link text, write the text inside the link tag after a pipe.
[[:Category:NAME]] [[:Category:NAME|TEXT]]
For example, to link to "Category:Help", write "[[:Category:Help]]
", which will result in Category:Help.
Redirect pages must also use the colon, otherwise it will be added to the category instead of redirecting.