Template:Cat. table entry: Difference between revisions

From SGUTranscripts
Jump to navigation Jump to search
m (Undo revision 18186 by Xanderox (talk) hmm..)
Tag: Undo
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
|style="width: 120px;border: 1px solid #E8E8ED;vertical-align: top"|<div style="position: relative">[[File:{{{icon}}}|link=Category:{{{category}}}|center|middle|120px]]
<includeonly>|style="width: 120px;border: 1px solid #E8E8ED;vertical-align: bottom"|<div style="position: relative">[[File:{{{icon}}}|link=Category:{{{category}}}|center|120px]]
<div style="position: absolute; right: 0px; top: 0px">
<div style="position: absolute; right: 0px; top: 0px">
{| style="background-color:#FFFFFF;border-spacing: 0; padding: 2;" cellpadding="2""
{| style="background-color:#FFFFFF;border-spacing: 0; padding: 2;" cellpadding="2""
Line 8: Line 8:
</div>
</div>
[[:Category:{{{category}}}| {{#if: {{{categoryLabel|}}} | {{{categoryLabel}}} | {{{category}}} }}]]
[[:Category:{{{category}}}| {{#if: {{{categoryLabel|}}} | {{{categoryLabel}}} | {{{category}}} }}]]
<noinclude>
</includeonly><noinclude>


=== Description ===
=== Description ===
Line 19: Line 19:
* <code>icon</code> &ndash; full filename of picture to use as category icon
* <code>icon</code> &ndash; full filename of picture to use as category icon
* <code>category</code> &ndash; category name
* <code>category</code> &ndash; category name
* <code>categoryLabel</code> &ndash; 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.
* <code>categoryLabel</code> &ndash; 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.


Example:
Example:

Latest revision as of 03:51, 13 July 2023


Description[edit]

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[edit]

There are 3 variables:

  • icon – full filename of picture to use as category icon
  • category – category name
  • categoryLabel – 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.

Example:

{{Cat. table entry
|icon          = CatIcon energy.png
|category      = Energy Healing
|categoryLabel = Alt med:<br>Energy Healing
}}

Copy[edit]

{{Cat. table entry
|icon           = 
|category       = 
|categoryLabel  = 
}}