1 Reply Latest reply on Aug 8, 2011 7:41 AM by UbuntuPenguin

    How to avoid numerous 'if statements' in item renderers

    flexillu10 Level 1

      I have an item renderer for a list with an image, label and a checkbox.

       

      These are visible depending on the dataProvider property of the list.

       

      E.g if an image is a premium image then display  the premium lable.

       

      The problem is i have a massive if statement, and this doesn't seem correct.

       

      So how can i seperate the logic from the item renderer?

       

      thanks