Template:Cat. table entry: Difference between revisions

From SGUTranscripts
Jump to navigation Jump to search
m (try making number of members <small>)
m (Undo revision 11692 by Xanderox (talk))
Tag: Undo
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
|style="width: 120px;border: 1px solid #E8E8ED;vertical-align: top"|[[File:{{{icon}}}|link=Category:{{{category}}}|center|middle|120px]]
|style="width: 120px;border: 1px solid #E8E8ED;vertical-align: top"|<div style="position: relative">[[File:{{{icon}}}|link=Category:{{{category}}}|center|middle|120px]]
[[:Category:{{{category}}}| {{#if: {{{categoryLabel|}}} | {{{categoryLabel}}} | {{{category}}} }}]]<small> ({{PAGESINCAT:{{{category}}}}})</small>
<div style="position: absolute; right: 0px; top: 0px">
{| style="background-color:#FFFFFF;border-spacing: 0; padding: 2;" cellpadding="2""
|-
|({{PAGESINCATEGORY:{{{category}}}}})
|}
</div>
</div>
[[:Category:{{{category}}}| {{#if: {{{categoryLabel|}}} | {{{categoryLabel}}} | {{{category}}} }}]]
<noinclude>
<noinclude>
=== Description ===
=== Description ===
This is a simplified way to add formatted entries to the [[User:Teleuteskitty/Draft_Browse_Categories|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.
This is a simplified way to add formatted entries to the [[Browse Categories|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]].
For a list of categories, see [[Special:Categories]].


=== Usage ===
=== Usage ===
There are 3 variables, <code>icon, category</code> and <code>cateogryLabel</code>.
There are 3 variables:
* <code>icon</code> &ndash; full filename of picture to use as category icon
* <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.


<code>cateogryLabel</code> is the text that appears as the category link, and is an optional variable. If omitted, the category name is used. Including this variable is useful when you wish to include a line break or use differnt text for a link to a category page.
Example:
<pre>
<pre>
{{Cat. table entry
{{Cat. table entry
|icon           =  
|icon         = CatIcon energy.png
|category       =  
|category     = Energy Healing
|categoryLabel =  
|categoryLabel = Alt med:<br>Energy Healing
}}
}}
</pre>
</pre>


Example:
=== Copy ===
<pre>
<pre>
{{Cat. table entry
{{Cat. table entry
|category      = Energy Healing
|icon          =  
|categoryLabel = Alt med:<br>Energy Healing
|category      =  
|icon          = CatIcon energy.png
|categoryLabel  =  
}}
}}
</pre>
</pre>
[[Category: Table entry templates]]
[[Category:Templates]]
</noinclude>

Revision as of 10:58, 2 June 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 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

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