Difference between revisions of "Template:Segmented control"
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
{{#vardefine:segmentCount|0}} | {{#vardefine:segmentCount|0}} | ||
{{#vardefine:i|1}} | {{#vardefine:i|1}} | ||
− | {{#while:| | + | {{#while:|{{{{{#var:i}}|}}} }} |
− | {{#vardefine:i|{{#expr:{{#var:i}}+1}}}} | + | |<nowiki/> |
+ | {{#vardefine:segmentCount|{{#var:i}}}} | ||
+ | {{#vardefine:i|{{#expr:{{#var:i}}+1}}}} | ||
}} | }} | ||
<div class="rsToggleContainer" style="text-align: center;"> | <div class="rsToggleContainer" style="text-align: center;"> | ||
{{#vardefine:i|1}} | {{#vardefine:i|1}} | ||
− | {{#while:|{{# | + | {{#while:|{{#expr:{{#var:i}}<={{#var:segmentCount}}}} |
− | |<nowiki /> | + | |<nowiki /> |
− | + | Loop {{#var:i}} | |
− | + | {{#vardefine:i|{{#expr:{{#var:i}}+1}} }} | |
− | + | }} | |
− | + | </div></includeonly> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 18:30, 28 March 2020
Usage example:
{{SegmentedControl |Title;Wiki page name |Title$icon.png;Wiki page name |Selected title |etc}}