Changes

Jump to navigation Jump to search
m
catcorr
{{#if:{{{1|}}}|{{#ifeq:{{{1|}}}|-||{{#ifeq:{{lc:{{padleft:|5|{{{1}}}}}}}|&#91;[cat|{{{1}}}|[[Category:{{{1}}}{{#switch:{{{2|-}}}|-=|␢|={{!}}&#32;|{{!}}{{{2}}}}}]]}}}}}}<noinclude>

{{Heavily used template}}


This subtemplate deals with a parameter which may be passed from elsewhere, and has an unknown format.<br><br>
The template checks: when the 1{{exp|st}} parameter is a "<code>-</code>" (minus/hyphen), nothing is done;<br>
otherwise it checks whether the 1{{exp|st}} parameter starts with "<tt><nowiki>[[Cat</nowiki></tt>":
* if yes, it is passed for categorizing as-it-is;
* if not, it is preceded with "<tt><nowiki>[[Category:</nowiki></tt>"
: and trailed with <small>(''an optional sorting item and'')</small> "<tt><nowiki>]]</nowiki></tt>", and then passed.
The 2{{exp|nd}} parameter may be any sorting item:
* to '''avoid''': don't define it, or define as "-";
* to use a '''space''': define empty "<tt>2=</tt>", or "<tt>&amp;#32;</tt>" or "<code>␢</code>".
[[Category:Image generation subtemplates| ]]
</noinclude>
Anonymous user

Navigation menu