Difference between revisions of "Template:Transient weight table"
SurtrFan8511 (talk | contribs) (Created page with "<includeonly><onlyinclude> {{#arraydefine:weighted transients|{{#ask: Has weight::+ |sort=Has English name|order=asc|link=none|limit=5000}}}}{{#arrayprint:weighted tranie...") |
SurtrFan8511 (talk | contribs) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><onlyinclude> | <includeonly><onlyinclude>{{#arraydefine:weighted transients|{{#ask: | ||
{{#arraydefine:weighted transients|{{#ask: | |||
[[Has weight::+]] | [[Has weight::+]] | ||
| | |?Has English name|mainlabel=-|headers=hide|link=none|limit=5000}}}}{{#arrayunique:weighted transients}}{{#arrayprint:weighted transients||@@@|<!--trimming text until it becomes a number | ||
-->{{#vardefine:i|1}}{{#vardefine:num|}}{{#while: | -->{{#vardefine:i|1}}{{#vardefine:num|}}{{#while: | ||
| {{#ifeq: {{#expr:{{#sub:{{#show:@@@|?Has weight}}|0|{{#var:i}}}} > 0}}|1|true}} | | {{#ifeq: {{#expr:{{#sub:{{#show:@@@|?Has subobject.Has weight}}|0|{{#var:i}}}} > 0}}|1|true}} | ||
| {{#vardefine:num|{{#sub:{{#show:@@@|?Has weight}}|0|{{#var:i}}}}}}{{#vardefine:i|{{#expr:{{#var:i}} + 1}}}} | | {{#vardefine:num|{{#sub:{{#show:@@@|?Has subobject.Has weight}}|0|{{#var:i}}}}}}{{#vardefine:i|{{#expr:{{#var:i}} + 1}}}} | ||
}}<!--creating subobject | }}<!--creating subobject | ||
-->{{# | -->{{#if:{{#var:num|}}|{{#subobject:weight@@@ | ||
| | | Has English name = @@@ | ||
| Has numbered weight = {{#var:num}} | | Has numbered weight = {{#var:num}} | ||
}}}}}}<!--printing the table | }}}}}}<!--printing the table | ||
-->{{#ask: | --><table class="wikitable sortable"> | ||
<tr> | |||
<th>Transient</th> | |||
<th>Weight</th> | |||
<tr/>{{#ask: | |||
[[Has numbered weight::+]] | [[Has numbered weight::+]] | ||
|?Has English name | |?Has English name | ||
|?Has numbered weight= | |?Has numbered weight | ||
|format=template | |||
|template=Transient weight table result format | |||
|named args=yes | |||
|limit=5000|mainlabel=-}} | |limit=5000|mainlabel=-}} | ||
</includeonly></onlyinclude><noinclude>{{Transient weight table}}</noinclude> | </table> | ||
</includeonly></onlyinclude><noinclude>Invoke this template by typing <code><nowiki>{{Transient weight table}}</nowiki></code></noinclude> |
Latest revision as of 15:44, 13 July 2020
Invoke this template by typing {{Transient weight table}}