Difference between revisions of "Template:CategorySummary"

From Wikispooks
Jump to navigation Jump to search
(|R to fix for >999 pages)
(Try a fix for empty category case)
Line 10: Line 10:
 
|titles=Template with Problems
 
|titles=Template with Problems
 
|titlep=Templates with Problems
 
|titlep=Templates with Problems
<nowiki>}}</nowiki></poem></font></noinclude><includeonly>{{#if: {{PAGESINCAT:{{{category|}}}|R}}>0|
+
<nowiki>}}</nowiki></poem></font></noinclude><includeonly>{{#ifeq: {{PAGESINCAT:{{{category|}}}|R}}|0||
 
==={{PAGESINCAT:{{{category|}}}}} {{spz|{{PAGESINCAT:{{{category|}}}|R}}|{{{titles|}}}|{{{titlep|}}}| ''(Currently empty...<!--Why does this show?... -->)''}}===
 
==={{PAGESINCAT:{{{category|}}}}} {{spz|{{PAGESINCAT:{{{category|}}}|R}}|{{{titles|}}}|{{{titlep|}}}| ''(Currently empty...<!--Why does this show?... -->)''}}===
 
[[image:{{#if: {{{image|}}}|{{{image}}}|UnsourcedDocs.png}}|47px|left|link=:category:{{{category|}}}]]
 
[[image:{{#if: {{{image|}}}|{{{image}}}|UnsourcedDocs.png}}|47px|left|link=:category:{{{category|}}}]]
 
{{{description|}}}}}</includeonly>
 
{{{description|}}}}}</includeonly>

Revision as of 17:32, 22 January 2015

This template was coded expressly for WikiSpooks:To Do.

Bug1.jpg This template has problems: This is behaving inconsistently for empty categories. The desired behaviour is to not print anything if a category is empty. Use the discussion page to start a debate about this.

It makes an appropriately entitled subsection for categories of pages which are non-empty.

Usage example:

{{CategorySummary
|image=bug1.jpg
|description=Wikispooks has a [[:Category:Templates with Problems|list of templates which are not working properly]]. These are all in active use, so would be a great help to the site if you can fix [[Help:templates |templates]].
|category=Templates with Problems
|titles=Template with Problems
|titlep=Templates with Problems
}}