No edit summary |
No edit summary Tag: Reverted |
||
| Line 3: | Line 3: | ||
| 0 | | 0 | ||
| {{#count:{{{1}}}{{{in|;}}}|{{{in|;}}}}} | | {{#count:{{{1}}}{{{in|;}}}|{{{in|;}}}}} | ||
| {{#vardefine:p-name|{{#explode:{{{1}}}|{{{in|;}}}|{{#var:p-loop}}}}}}{{#ifeq:Level|{{#sub:{{#var:p-name}}|0|5}}|{{Level|{{#explode:{{#var:p-name}}| |1}}}}|{{#ifexist:{{SplitP|{{#var:p-name}}|out}}|[[{{SplitP|{{#var:p-name}}|out}}]]|{{#var:p-name}}}}}}{{#ifexpr:{{#var:p-loop}} = {{#count:{{{1}}}|{{{in|;}}}}}||{{#ifeq:{{{out}}}|br|<br />|{{{out|,}}} }}}} | | {{#vardefine:p-name|{{#explode:{{{1}}}|{{{in|;}}}|{{#var:p-loop}}}}}}{{#ifeq:Level|{{#sub:{{#var:p-name}}|0|5}}|{{Level|{{#explode:{{#var:p-name}}| |1}}}}|{{#ifexist:{{SplitP|{{#var:p-name}}|out}}|[[{{SplitP|{{#var:p-name}}|out}}]] {{SplitP|{{#var:p-name}}|out}}}}{{#ifexpr:{{#var:p-loop}} = {{#count:{{{1}}}|{{{in|;}}}}}||{{#ifeq:{{{out}}}|br|<br />|{{{out|,}}} }}}} | ||
}}</onlyinclude></includeonly> | }}</onlyinclude></includeonly> | ||
Revision as of 13:42, 9 January 2025
Template:SplitLink is used to break up lists of (potential) references to other pages and create links if they exist.
Usage
It accepts one mandatory string parameter, a delimited list of article titles.
It accepts two optional string parameters, which can be used to control what delimiters are used.
in(default;) controls the delimiter used for the input.out(default,) controls the delimiter used for the output.
Return
It returns a delimited list of article titles, as links if the article exists or as plain text if it does not.
For example,{{SplitLink|Mattias Torrez; Shirayuri}} returns: {{#loop: p-loop
For example, | 0 | 2
| Expression error: Unexpected = operator.{{SplitLink|SCIRE, Level 3, Mall|in=,}} returns: {{#loop: p-loop
| 0 | 3
| Expression error: Unexpected = operator.The documentation above was transcluded from Template:SplitLink/Documentation. [edit]
