Difference between revisions of "Template:Segmented control"

From Co-Optitude Wiki
Jump to navigation Jump to search
Line 10: Line 10:
 
</noinclude>
 
</noinclude>
 
<includeonly>
 
<includeonly>
 +
{{#vardefine:segmentCount|0}}{{#vardefine:i|1}}{{#while:|{{#if:{{{{{#var:i}}|}}}|true}}|<nowiki/>{{#vardefine:segmentCount|{{#expr:{{#var:segmentCount}}+1}}}}{{#vardefine:i|{{#expr:{{#var:i}}+1}}}}}}
 +
* Segment count: {{#var:segmentCount}}
 
{{#vardefine:i|1}}{{#while:
 
{{#vardefine:i|1}}{{#while:
 
|{{#if:{{{{{#var:i}}|}}}|true}}
 
|{{#if:{{{{{#var:i}}|}}}|true}}

Revision as of 16:44, 28 March 2020

Usage example:

{{SegmentedControl
  |Title;Wiki page name
  |Image.png;Title;Wiki page name
  |Selected title;
  |etc}}