Difference between revisions of "Template:Linked name list"
Jump to navigation
Jump to search
Rocketsoup (talk | contribs) |
Rocketsoup (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
<pre> | <pre> | ||
{{Linked name list | {{Linked name list | ||
− | |Names=First Last; First Last; First Last}} | + | |Names=First Last; First Last; First Last |
+ | |CategoryPrefix= | ||
+ | |CategorySuffix=}} | ||
</pre> | </pre> | ||
+ | If <code>CategoryPrefix</code> or <code>CategorySuffix</code> is specified, a category tag will be added for each name. | ||
</noinclude><includeonly>{{#vardefine:names|{{{Names|}}}}}{{#vardefine:i|0}}{{#while: | </noinclude><includeonly>{{#vardefine:names|{{{Names|}}}}}{{#vardefine:i|0}}{{#while: | ||
|{{#vardefine:name|{{#explode:{{#var:names}}|;|{{#var:i}} }}}}{{#var:name}} | |{{#vardefine:name|{{#explode:{{#var:names}}|;|{{#var:i}} }}}}{{#var:name}} | ||
− | |<nowiki/>{{#ifexpr:{{#var:i}} > 0|<br/>}}[[{{#var:name}}]]{{#vardefine:i|{{#expr:{{#var:i}}+1}} }} }}</includeonly> | + | |<nowiki/>{{#ifexpr:{{#var:i}} > 0|<br/>}}[[{{#var:name}}]]{{#if:{{{CategoryPrefix|}}}{{{CategorySuffix|}}}|[[Category:{{{CategoryPrefix|}}} {{#var:name}} {{{CategorySuffix|}}}]]}}{{#vardefine:i|{{#expr:{{#var:i}}+1}} }}}}</includeonly> |
Latest revision as of 22:44, 16 January 2020
Usage example:
{{Linked name list |Names=First Last; First Last; First Last |CategoryPrefix= |CategorySuffix=}}
If CategoryPrefix
or CategorySuffix
is specified, a category tag will be added for each name.