Difference between revisions of "Template:Videos"
From MansonWiki, the Marilyn Manson encyclopedia
m |
(fixed? O_o) |
||
Line 7: | Line 7: | ||
<!-- if no value is specified, then wiki moves the key to the value, and the key becomes a natural number starting from 1 and so forth -- so it's NOT an empty string... no parseInt() or so -- then stupid switch supporting up to 99 untitled videos, because MediaWiki does not provide a way. we assume if the length of the key is 1 or 2 then it's an auto-generated key like 1 or 14 or so --> | <!-- if no value is specified, then wiki moves the key to the value, and the key becomes a natural number starting from 1 and so forth -- so it's NOT an empty string... no parseInt() or so -- then stupid switch supporting up to 99 untitled videos, because MediaWiki does not provide a way. we assume if the length of the key is 1 or 2 then it's an auto-generated key like 1 or 14 or so --> | ||
{{#switch: {{#len: {{#expr: {{#var: K}} }} }} | {{#switch: {{#len: {{#expr: {{#var: K}} }} }} | ||
− | | 1 = {{#vardefine: K | {{#var: V}} }} {{#vardefine: V |}} | + | | 1 = {{#vardefine: K | {{#var: V}} }} {{#vardefine: V | }} |
− | | 2 = {{#vardefine: K | {{#var: V}} }} {{#vardefine: V |}} | + | | 2 = {{#vardefine: K | {{#var: V}} }} {{#vardefine: V | }} |
}} | }} | ||
Revision as of 19:03, 18 May 2014
Sample usage:
{{Videos | moH2IHWOZXs = "[[The Last Day on Earth]]" | vimeo:56060581 = "The Last Day on Earth" }}