ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Switch class not working?

November 22, 2012 6:47am

Subscribe [1]
  • #1 / Nov 22, 2012 6:47am

    ciprian

    17 posts

    I’m having a problem with an apparently very simple line of code where I’m using the “switch” class.

    Here is my code:

      {exp:channel:categories channel="legal_services" style="linear"}
      {exp:channel:entries channel="sections" category="{category_id}”}
                  <div class=”{switch='even|odd'}”>

    {category_name}

                    {section_intro}
                    More >
                  <div class=“img-wrapper”>
      {section_images}
                    {section_img_small}
      {/section_images}
                  </div>
                  </div>
      {/exp:channel:entries}
      {/exp:channel:categories}

    and here is the rendered template:

    http://www.efc.ie/test/what/legal

    My entries are all within a div and they should show an alternate white/pink background just like this page here:

    http://zinc.ie/collins/what-legal.html

    But for some reason the <div class=”{switch='even|odd'}”> is not working.

    Any idea why this is happening? what am I doing wrong?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases