Difference between revisions of "Template:Segmented control"

From Co-Optitude Wiki
Jump to navigation Jump to search
Line 17: Line 17:
 
   {{#vardefine:i|{{#expr:{{#var:i}}+1}}}}
 
   {{#vardefine:i|{{#expr:{{#var:i}}+1}}}}
 
}}
 
}}
 +
* Segment count is {{#var:segmentCount}}
 
<div class="rsToggleContainer" style="text-align: center;">
 
<div class="rsToggleContainer" style="text-align: center;">
 
{{#vardefine:i|1}}
 
{{#vardefine:i|1}}
{{#while:|{{#expr:{{#var:i}}<={{#var:segmentCount}}}}
+
{{#while:|{{#ifexpr:{{#var:i}}<={{#var:segmentCount}}|true}}
 
   |<nowiki />
 
   |<nowiki />
 
   Loop {{#var:i}}
 
   Loop {{#var:i}}

Revision as of 18:33, 28 March 2020

Usage example:

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