Template

Difference between revisions of "AddToCategory"

From Lacey Green History

(Created page with "<noinclude> This is the "AddToCategory" template. It should be called in the following format: <pre> {{AddToCategory |Category= |SortKey= }} </pre> Edit the page to see the te...")
 
 
(13 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
</noinclude>
 
</noinclude>
 
<includeonly>
 
<includeonly>
{{#if: {{{Category|}}}
+
{{#arraymap:{{{Category|}}}|,|x|
  |
+
   {{#if: x
   {{#if: {{{SortKey|}}}
 
 
     |
 
     |
     [[{{{Category}}}|{{{SortKey}}}]]
+
     {{#if: {{{SortKey|}}}
 +
      |
 +
      [[Category:x|{{{SortKey}}}]]
 +
      |
 +
      [[Category:x]]
 +
    }}
 
     |
 
     |
    [[{{{Category}}}]]
 
 
   }}
 
   }}
  |
+
|\s}}  
}}
 
 
</includeonly>
 
</includeonly>

Latest revision as of 07:52, 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.