Template:Cat. table entry: Difference between revisions
Jump to navigation
Jump to search
Tag: Undo |
(→Usage) |
||
Line 19: | Line 19: | ||
* <code>icon</code> – full filename of picture to use as category icon | * <code>icon</code> – full filename of picture to use as category icon | ||
* <code>category</code> – category name | * <code>category</code> – category name | ||
* <code>categoryLabel</code> – optional text that appears as the category link. If omitted, the category name is used. Including this variable is useful when you wish to include a line break or use alternative text for a link to a category page. | * <code>categoryLabel</code> – optional text that appears as the category link. If omitted, the category name is used. Including this variable is useful when you wish to include a line break or use alternative text for a link to a category page. One reason to do this is for subcategories. In the example, the category "Energy Healing" is actually a subcategory of "Alternative Medicine", so it's useful to give the "category" a label that groups it alphabetically with "Alternative Medicine" on the [[Browse Categories]] page. | ||
Example: | Example: |
Revision as of 15:41, 27 April 2020
|style="width: 120px;border: 1px solid #E8E8ED;vertical-align: top"|
[[File:{{{icon}}}|link=Category:{{{category}}}|center|middle|120px]]
(0) |
[[:Category:{{{category}}}| {{{category}}}]]
Description
This is a simplified way to add formatted entries to the Browse Categories page. It includes the icon, category, the text used for the link to the category page, and the number of members in that category.
For a list of categories, see Special:Categories.
Usage
There are 3 variables:
icon
– full filename of picture to use as category iconcategory
– category namecategoryLabel
– optional text that appears as the category link. If omitted, the category name is used. Including this variable is useful when you wish to include a line break or use alternative text for a link to a category page. One reason to do this is for subcategories. In the example, the category "Energy Healing" is actually a subcategory of "Alternative Medicine", so it's useful to give the "category" a label that groups it alphabetically with "Alternative Medicine" on the Browse Categories page.
Example:
{{Cat. table entry |icon = CatIcon energy.png |category = Energy Healing |categoryLabel = Alt med:<br>Energy Healing }}
Copy
{{Cat. table entry |icon = |category = |categoryLabel = }}