Template:Nominal list: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
(Created page with "{| {{#if:{{{2|}}}|{{!}}- {{!}}align=right {{!}} {{{1|1}}}.{{!}}{{!}} {{{2|}}} |}} {{#if:{{{4|}}}|{{!}}- {{!}}align=right {{!}} {{{3|2}}}.{{!}}{{!}} {{{4|}}} |}} |}<noinclude>...")
 
mNo edit summary
Line 18: Line 18:


Creation script:
Creation script:
 
<pre>
var itterations=25;
var output = '{|\r\n';
for (var i=0;i<itterations;i++) {
    var base = i+1;
    output=output+'{{if#:{{{'+(base*2)+'|}}}|{{!}}-\r\n';
    output=output+'{{!}}align=right {{!}} {{{'+((base*2)-1)+'|'+base+'}}}.{{!}}{{!}} {{{'+(base*2)+'|}}}\r\n';
    output=output+'|}}\r\n';
}
output=output+'|}';
</pre>


</noinclude>
</noinclude>

Revision as of 08:01, 5 August 2020

Usage:

{{
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 = '{|\r\n';
for (var i=0;i<itterations;i++) {
    var base = i+1;
    output=output+'{{if#:{{{'+(base*2)+'|}}}|{{!}}-\r\n';
    output=output+'{{!}}align=right {{!}} {{{'+((base*2)-1)+'|'+base+'}}}.{{!}}{{!}} {{{'+(base*2)+'|}}}\r\n';
    output=output+'|}}\r\n';
}
output=output+'|}';