Difference between revisions of "Template:Segmented control"

From Co-Optitude Wiki
Jump to navigation Jump to search
Line 14: Line 14:
 
   {{#vardefine:segmentLink|{{#explode:{{{Links}}}|;|{{#var:i}} }} }}
 
   {{#vardefine:segmentLink|{{#explode:{{{Links}}}|;|{{#var:i}} }} }}
 
{{#if:{{#var:segmentLink}}|
 
{{#if:{{#var:segmentLink}}|
* {{#if:{{#var:segmentImage}}|[[File:{{#var:segmentImage}}|20px|none|link={{#var:segmentLink}}]] }}[[{{#var:segmentLink}}|{{#var:segmentTitle}}]]|
+
* {{#if:{{#var:segmentImage}}|[[File:{{#var:segmentImage}}|20px|frameless|middle|link={{#var:segmentLink}}|{{#var:segmentTitle}}]] }}[[{{#var:segmentLink}}|{{#var:segmentTitle}}]]|
* {{#if:{{#var:segmentImage}}|[[File:{{#var:segmentImage}}|20px|none|link=]] }}{{#var:segmentTitle}}}}
+
* {{#if:{{#var:segmentImage}}|[[File:{{#var:segmentImage}}|20px|frameless|middle|link=|{{#var:segmentTitle}}]] }}{{#var:segmentTitle}}}}
 
   {{#vardefine:i|{{#expr:{{#var:i}}+1}}}}
 
   {{#vardefine:i|{{#expr:{{#var:i}}+1}}}}
 
}}
 
}}
 
</includeonly>
 
</includeonly>

Revision as of 18:56, 28 March 2020

Usage example:

{{SegmentedControl
  |Titles=Title 1;Title 2;Title 3}}