2

I am unable to get Switchee to work. I have installed the Switchee 2.0.6 with ExpressionEngine 2.5.2.

Here is the conditional statement that I'd like to use, where "champions" is a custom field:

{if champions == "team 3"}
   <p>team 3</p>
{/if}

and here is how I've incorporated Switchee:

{exp:switchee variable = "{champions}" parse="inward"}
    {case value == "team 3"}
        <p>team 3</p>
    {/case}
{/exp:switchee}

My switchee statement shows nothing in my template in my browser. What am i doing wrong here?

3

If you look at the documentation a bit more carefully, you'll see that the {case value="xxx"} tags only use a single = sign.

So, this should work

{exp:switchee variable = "{champions}" parse="inward"}
    {case value="team 3"}
        <p>team 3</p>
    {/case}
{/exp:switchee}
2
  • 1
    oh wow (feeling silly). thanks for seeing that error! working now – jennetcetera Nov 5 '13 at 16:42
  • 2
    It happens to all of us. Glad it was an easy one! – Jeremy Gimbel Nov 5 '13 at 16:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.