Template:Nominal list: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 49: | Line 49: | ||
{{!}}align=right {{!}}{{#if:{{{47|}}}|{{{47|}}}|{{#if:{{{zeroindex|}}}|23|24}}}}.{{!}}{{!}} {{{48|}}}|}}{{#if:{{{50|}}}|<nowiki></nowiki> | {{!}}align=right {{!}}{{#if:{{{47|}}}|{{{47|}}}|{{#if:{{{zeroindex|}}}|23|24}}}}.{{!}}{{!}} {{{48|}}}|}}{{#if:{{{50|}}}|<nowiki></nowiki> | ||
{{!}}- | {{!}}- | ||
{{!}}align=right {{!}}{{#if:{{{49|}}}|{{{49|}}}|{{#if:{{{zeroindex|}}}|24|25}}}}.{{!}}{{!}} {{{50|}}}|}}|}<noinclude> | {{!}}align=right {{!}}{{#if:{{{49|}}}|{{{49|}}}|{{#if:{{{zeroindex|}}}|24|25}}}}.{{!}}{{!}} {{{50|}}}|}} | ||
|}<noinclude> | |||
Usage: | Usage: | ||
<pre> | <pre> | ||
{{ | {{nominal list| | ||
1|Rotterdam| //1. Rotterdam | 1|Rotterdam| //1. Rotterdam | ||
2|The Hague| //2. The Hague | 2|The Hague| //2. The Hague | ||
Line 70: | Line 71: | ||
output=output+'|}}'; | output=output+'|}}'; | ||
} | } | ||
output=output+'|}'; | output=output+'\r\n|}'; | ||
</pre> | </pre> | ||
</noinclude> | </noinclude> |
Latest revision as of 14:24, 4 March 2021
Usage:
{{nominal list| 1|Rotterdam| //1. Rotterdam 2|The Hague| //2. The Hague 2,5|Amsterdam| //2,5. Amsterdam |Zutphen| //4. Zutphen }}
Creation script:
var itterations=25; var output = '{|'; for (var i=0;i<itterations;i++) { var base = i+1; output=output+'{{#if:{{{'+(base*2)+'|}}}|\r\n{{!}}-'; output=output+'\r\n{{!}}align=right {{!}}{{#if:{{{'+((base*2)-1)+'|}}}|{{{'+((base*2)-1)+'|}}}|{{#if:{{{zeroindex|}}}|'+(base-1)+'|'+base+'}}}}.{{!}}{{!}} {{{'+(base*2)+'|}}}'; output=output+'|}}'; } output=output+'\r\n|}';