Template

Difference between revisions of "AddToCategory"

From Lacey Green History

Line 11: Line 11:
 
</noinclude>
 
</noinclude>
 
<includeonly>
 
<includeonly>
{{#if: {{{Category|}}}
+
{{#arraymap:{{{Category|}}}|,|x|
 +
{{#if: {{{x|}}}
 
   |
 
   |
 
   {{#if: {{{SortKey|}}}
 
   {{#if: {{{SortKey|}}}
 
     |
 
     |
     [[Category:{{{Category}}}|{{{SortKey}}}]]
+
     [[Category:{{{x}}}|{{{SortKey}}}]]
 
     |
 
     |
     [[Category:{{{Category}}}]]
+
     [[Category:{{{x}}}]]
 
   }}
 
   }}
 
   |
 
   |
 +
}}
 
}}
 
}}
 
</includeonly>
 
</includeonly>

Revision as of 07:37, 22 November 2020

This is the "AddToCategory" template. It should be called in the following format:

{{AddToCategory
|Category=
|SortKey=
}}

Edit the page to see the template text.