Difference between revisions of "Template:Segmented control"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
<pre> | <pre> | ||
{{SegmentedControl | {{SegmentedControl | ||
− | |Title; | + | |Titles=Title 1;Title 2;Title 3}} |
− | |||
− | |||
− | |||
</pre> | </pre> | ||
</noinclude> | </noinclude> | ||
Line 12: | Line 9: | ||
{{#vardefine:segmentCount|0}} | {{#vardefine:segmentCount|0}} | ||
{{#vardefine:i|1}} | {{#vardefine:i|1}} | ||
− | {{#while:|{{{{{#var:i}} | + | {{#while:|{{#vardefine:segmentTitle|{{#explode:{{{Titles}}}|;|{{#var:i}} }} }}{{#var:segmentTitle}} |
|<nowiki/> | |<nowiki/> | ||
− | * | + | * Title = {{#var:segmentTitle}} |
− | |||
{{#vardefine:i|{{#expr:{{#var:i}}+1}}}} | {{#vardefine:i|{{#expr:{{#var:i}}+1}}}} | ||
}} | }} | ||
− | + | </includeonly> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 18:45, 28 March 2020
Usage example:
{{SegmentedControl |Titles=Title 1;Title 2;Title 3}}