Jump to content

Template:Category Icons: Difference between revisions

From WikiPETia.info
Tests
Removed spaces, re-added comment
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-- We want only 3 icons per line, therefore we need two loops -->
<!-- We want only 3 icons per line, therefore we need two loops -->{{ #vardefine: i | 1 }}{{ #vardefine: j | 1 }}{{ #while:
{{ #vardefine: i | 1 }}
{{ #vardefine: j | 1 }}
{{ #while:
   | {{{ {{ #var: i }} | }}}
   | {{{ {{ #var: i }} | }}}
   | {{ #vardefine: j | {{ #expr: {{ #var: j }} + 3 }} }}
   | {{ #vardefine: j | {{ #expr: {{ #var: j }} + 3 }} }}
     {{ #tag: gallery
     {{ #tag: gallery
       | {{ #while:
       | {{ #while:
         | {{ #ifexpr: {{ #expr: {{{ {{ #var: i }} | }}} | true }} and {{ #expr: {{ #var: i }} < {{ #var: j }} }} | true }}
         | {{ #ifexpr: {{ #var: i }} < {{ #var: j }} | true }}
         | <span style="display:none;">{{ #var: i }}</span>
         | <span style="display:none;">.</span>
           File:Icon {{ #switch: {{{ {{ #var: i }} | }}}
           {{ #switch: {{{ {{ #var: i }} | }}}
          | Companies = company.png{{!}}[[Companies]]
            | Companies = File:Icon company.png{{!}}[[Companies]]
          | Events = event.png{{!}}[[Events]]
            | Events = File:Icon event.png{{!}}[[Events]]
          | People = people.png{{!}}[[People]]
            | People = File:Icon people.png{{!}}[[People]]
          | Material = material.png{{!}}[[Material]]
            | Material = File:Icon material.png{{!}}[[Material]]
          | Recycling = recycling.png{{!}}[[PET recycling]]
            | Recycling = File:Icon recycling.png{{!}}[[PET recycling]]
          | Preforms = preform.png{{!}}[[Preform production]]
            | Preforms = File:Icon preform.png{{!}}[[Preform production]]
          | Bottle making = bottle.png{{!}}[[Bottle making]]
            | Bottle making = File:Icon bottle.png{{!}}[[Bottle making]]
          | Filling = filling.png{{!}}[[Filling]]
            | Filling = File:Icon filling.png{{!}}[[Filling]]
          | Capping = capping.png{{!}}[[Capping]]
            | Capping = File:Icon capping.png{{!}}[[Capping]]
          | Labelling = labeling.png{{!}}[[Labelling]]
            | Labelling = File:Icon labeling.png{{!}}[[Labelling]]
           }}
           }}
           {{ #vardefine: i | {{ #expr: {{ #var: i }} + 1 }} }}
           {{ #vardefine: i | {{ #expr: {{ #var: i }} + 1 }} }}

Latest revision as of 13:31, 30 March 2017