Jump to content

Template:Category Icons: Difference between revisions

From WikiPETia.info
Removed spaces, re-added comment
No edit summary
Line 1: Line 1:
<!-- We want only 3 icons per line, therefore we need two loops -->{{ #vardefine: i | 1 }}{{ #vardefine: j | 1 }}{{ #while:
{{CategoryTiles|size=medium
  | {{{ {{ #var: i }} | }}}
{{#if:{{{1|}}}|{{!}}{{{1}}}}}
  | {{ #vardefine: j | {{ #expr: {{ #var: j }} + 3 }} }}
{{#if:{{{2|}}}|{{!}}{{{2}}}}}
    {{ #tag: gallery
{{#if:{{{3|}}}|{{!}}{{{3}}}}}
      | {{ #while:
{{#if:{{{4|}}}|{{!}}{{{4}}}}}
        | {{ #ifexpr: {{ #var: i }} < {{ #var: j }} | true }}
{{#if:{{{5|}}}|{{!}}{{{5}}}}}
        | <span style="display:none;">.</span>
{{#if:{{{6|}}}|{{!}}{{{6}}}}}
          {{ #switch: {{{ {{ #var: i }} | }}}
{{#if:{{{7|}}}|{{!}}{{{7}}}}}
            | Companies = File:Icon company.png{{!}}[[Companies]]
{{#if:{{{8|}}}|{{!}}{{{8}}}}}
            | Events = File:Icon event.png{{!}}[[Events]]
{{#if:{{{9|}}}|{{!}}{{{9}}}}}
            | People = File:Icon people.png{{!}}[[People]]
{{#if:{{{10|}}}|{{!}}{{{10}}}}}
            | Material = File:Icon material.png{{!}}[[Material]]
{{#if:{{{11|}}}|{{!}}{{{11}}}}}
            | Recycling = File:Icon recycling.png{{!}}[[PET recycling]]
{{#if:{{{12|}}}|{{!}}{{{12}}}}}
            | Preforms = File:Icon preform.png{{!}}[[Preform production]]
            | Bottle making = File:Icon bottle.png{{!}}[[Bottle making]]
            | Filling = File:Icon filling.png{{!}}[[Filling]]
            | Capping = File:Icon capping.png{{!}}[[Capping]]
            | Labelling = File:Icon labeling.png{{!}}[[Labelling]]
          }}
          {{ #vardefine: i | {{ #expr: {{ #var: i }} + 1 }} }}
        }}
      | mode = "packed-hover"
    }}
}}
}}

Revision as of 22:43, 19 July 2025