Template:Consecutive links: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
add support for prefix and postfix
mNo edit summary
Line 10: Line 10:


<code><nowiki>{{Consecutive links|Joppa/Kyakukya/Grit Gate|/|/}}</nowiki></code>
<code><nowiki>{{Consecutive links|Joppa/Kyakukya/Grit Gate|/|/}}</nowiki></code>
{{Consecutive links|Joppa/Kyakukya/Grit Gate|/|/}}


Additionally, you can use the 4th and 5th parameters to specify an overall prefix and an overall postfix to the string that is returned.
Additionally, you can use the 4th and 5th parameters to specify an overall prefix and an overall postfix to the string that is returned.


{{Consecutive links|Joppa/Kyakukya/Grit Gate|/|/}}</noinclude>
<code><nowiki>{{Consecutive links|Joppa/Kyakukya/Grit Gate|/|<div class{{=}}"example"></div>|<div class{{=}}"example">|</div>}}</nowiki></code>
 
{{consecutive links|Joppa/Kyakukya/Grit Gate|/|-|(|)}}
</noinclude>

Revision as of 15:30, 12 August 2019


Template that allows auto linking of a list by a specified delimiter.Usage:

{{Consecutive links|Joppa, Kyakukya, Grit Gate}}

Joppa, Kyakukya, Grit Gate

The delimiter defaults to ,(ignoring white space) if not specified, and splits it by , if that wants to change, then a delimiter can be specified in a second argument:

{{Consecutive links|Joppa/Kyakukya/Grit Gate|/|/}}

Joppa/Kyakukya/Grit Gate

Additionally, you can use the 4th and 5th parameters to specify an overall prefix and an overall postfix to the string that is returned.

{{Consecutive links|Joppa/Kyakukya/Grit Gate|/|<div class{{=}}"example"></div>|<div class{{=}}"example">|</div>}}

(Joppa-Kyakukya-Grit Gate)