Template:Nominal list: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 92: | Line 92: | ||
for (var i=0;i<itterations;i++) { | for (var i=0;i<itterations;i++) { | ||
var base = i+1; | var base = i+1; | ||
output=output+'{{if | output=output+'{{#if:{{{'+(base*2)+'|}}}|{{!}}-\r\n'; | ||
output=output+'{{!}}align=right {{!}} {{{'+((base*2)-1)+'|'+base+'}}}.{{!}}{{!}} {{{'+(base*2)+'|}}}\r\n'; | output=output+'{{!}}align=right {{!}} {{{'+((base*2)-1)+'|'+base+'}}}.{{!}}{{!}} {{{'+(base*2)+'|}}}\r\n'; | ||
output=output+'|}}\r\n'; | output=output+'|}}\r\n'; |
Revision as of 08:03, 5 August 2020
Template:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:IfTemplate:If
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+'|}';