Jump to content

Template:Category Icons: Difference between revisions

From WikiPETia.info
Maybe now?
Removed spaces, re-added comment
(3 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 }} }}
Line 8: Line 5:
       | {{ #while:
       | {{ #while:
         | {{ #ifexpr: {{ #var: i }} < {{ #var: j }} | true }}
         | {{ #ifexpr: {{ #var: i }} < {{ #var: j }} | true }}
         | <span style="display:none;">{{ #var: i }}</span>
         | <span style="display:none;">.</span>
           {{ #switch: {{{ {{ #var: i }} | }}}
           {{ #switch: {{{ {{ #var: i }} | }}}
             | File:Icon Companies = company.png{{!}}[[Companies]]
             | Companies = File:Icon company.png{{!}}[[Companies]]
             | File:Icon Events = event.png{{!}}[[Events]]
             | Events = File:Icon event.png{{!}}[[Events]]
             | File:Icon People = people.png{{!}}[[People]]
             | People = File:Icon people.png{{!}}[[People]]
             | File:Icon Material = material.png{{!}}[[Material]]
             | Material = File:Icon material.png{{!}}[[Material]]
             | File:Icon Recycling = recycling.png{{!}}[[PET recycling]]
             | Recycling = File:Icon recycling.png{{!}}[[PET recycling]]
             | File:Icon Preforms = preform.png{{!}}[[Preform production]]
             | Preforms = File:Icon preform.png{{!}}[[Preform production]]
             | File:Icon Bottle making = bottle.png{{!}}[[Bottle making]]
             | Bottle making = File:Icon bottle.png{{!}}[[Bottle making]]
             | File:Icon Filling = filling.png{{!}}[[Filling]]
             | Filling = File:Icon filling.png{{!}}[[Filling]]
             | File:Icon Capping = capping.png{{!}}[[Capping]]
             | Capping = File:Icon capping.png{{!}}[[Capping]]
             | File:Icon Labelling = labeling.png{{!}}[[Labelling]]
             | Labelling = File:Icon labeling.png{{!}}[[Labelling]]
           }}
           }}
           {{ #vardefine: i | {{ #expr: {{ #var: i }} + 1 }} }}
           {{ #vardefine: i | {{ #expr: {{ #var: i }} + 1 }} }}

Revision as of 13:31, 30 March 2017