From GamingWiki
Line 34: | Line 34: | ||
-->{{#vardefine: num | {{#rmatch: {{#var:keynum}} | (\D+)(\d+) | $2 }} }}<!-- | -->{{#vardefine: num | {{#rmatch: {{#var:keynum}} | (\D+)(\d+) | $2 }} }}<!-- | ||
− | --> | + | -->{{#hashdefine: singledataline | {{#hashvalue: datalinehash | {{#var:num}} }} | ,css, | ;css; }}<!-- |
− | + | -->{{#hashinclude: singledataline | {{#var:key}} = {{#var:value}} }}<!-- | |
− | + | -->{{#if: {{#var: num}} | <!-- | |
− | |||
− | |||
− | |||
− | --> | ||
− | --> | ||
-->{{#hashinclude: datalinehash | <!-- | -->{{#hashinclude: datalinehash | <!-- | ||
-->{{#var:num}} = {{#hashprint: singledataline | ,css, | %%%% | @@@@ | %%%%;css;@@@@ }} <!-- | -->{{#var:num}} = {{#hashprint: singledataline | ,css, | %%%% | @@@@ | %%%%;css;@@@@ }} <!-- | ||
-->}}<!-- | -->}}<!-- | ||
− | --> | + | -->}}<!-- |
− | --> | + | -->{{#hashreset: singledataline}}<!-- |
− | --> | + | -->}}<!-- end forargs |
Now each value of datalinehash can be parsed into a new hash. We want it sorted by | Now each value of datalinehash can be parsed into a new hash. We want it sorted by | ||
key, so we use a key array. | key, so we use a key array. | ||
− | --> | + | -->{{#hashtoarray:|datalinehash|datalinekeys}}<!-- |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
-->{{#arraysort:datalinekeys|asc}}<!-- | -->{{#arraysort:datalinekeys|asc}}<!-- | ||
Line 75: | Line 62: | ||
{{!}}- <!-- | {{!}}- <!-- | ||
− | -->{{#ifeq: {{#var: labelcols | 0 | |<nowiki /> | + | -->{{#ifeq: {{#var: labelcols}} | 0 | |<nowiki /> |
{{!}} class="{{#hashvalue: thedataline | labelclass | shaded}}" {{!}} {{#hashvalue: thedataline | label }} <!-- | {{!}} class="{{#hashvalue: thedataline | labelclass | shaded}}" {{!}} {{#hashvalue: thedataline | label }} <!-- | ||
-->}}<!-- | -->}}<!-- | ||
Line 82: | Line 69: | ||
{{!}} class="{{#hashvalue: thedataline|dataclass|}}" colspan="{{#var:datacols}}" {{!}} {{#hashvalue: thedataline | data }} <!-- | {{!}} class="{{#hashvalue: thedataline|dataclass|}}" colspan="{{#var:datacols}}" {{!}} {{#hashvalue: thedataline | data }} <!-- | ||
− | -->{{#ifeq: {{#var: rdatacols | 0 | |<nowiki /> | + | -->{{#ifeq: {{#var: rdatacols}} | 0 | |<nowiki /> |
{{!}} class="{{#hashvalue: thedataline|dataclass|}}" {{!}} {{#hashvalue: thedataline | rdata }} <!-- | {{!}} class="{{#hashvalue: thedataline|dataclass|}}" {{!}} {{#hashvalue: thedataline | rdata }} <!-- | ||
-->}}<!-- | -->}}<!-- | ||
-->}}<!-- end ifeq | -->}}<!-- end ifeq | ||
-->{{#hashreset: thedataline }}<!-- | -->{{#hashreset: thedataline }}<!-- | ||
− | --> | + | -->}}<!-- end hashprint datalinehash |
-->{{#hashreset: datalinehash }}<!-- | -->{{#hashreset: datalinehash }}<!-- | ||