2
{exp:channel:entries channel="games" limit="1" dynamic="yes"}
{game_platforms} 
    {if item == "PS3"}test{/if} 
    <span>{item}</span>
{/game_platforms} 
{/exp:channel:entries}

I set this up in a testing template and oddly, the curly braces aren't even parsing, here's what I'm getting:

{if "PC" == "PS3"}PS3{/if} PC {if "PS3" == "PS3"}PS3{/if} PS3 {if "Xbox 360" == "PS3"}PS3{/if} Xbox 360

Am I doing something wrong?

6
  • 2
    What kind of field is game_options? What version of EE? Do other conditionals in other fields work? Commented Oct 25, 2013 at 13:22
  • 2
    What happens with {if "{item}" == ..... ? Commented Oct 25, 2013 at 14:44
  • @DerekHogue game_platforms is a checkbox field. Other conditionals seem to be working fine in the rest of the template, but within the {game_platforms} nothing is parsing, even {if username == "Jake"} won't work.
    – user2265
    Commented Oct 25, 2013 at 16:33
  • @Romans-8---31-39 Same issue occurs
    – user2265
    Commented Oct 25, 2013 at 16:37
  • What version of EE? Commented Oct 25, 2013 at 17:25

2 Answers 2

1

This is a bug noted in EE2.5.3+ - https://support.ellislab.com/bugs/detail/18336 - I ran into this one myself.

It's been fixed as of EE2.7.2 - http://ellislab.com/expressionengine/user-guide/about/changelog.html#version-2-7-2 (bug #19624)

3
  • Ah, thank you for your help. Do you know of any way to fix it without upgrading?
    – user2265
    Commented Oct 26, 2013 at 22:50
  • I don't think there was a fix, however if you use {game_platforms} <span>{item}</span> {/game_platforms} does that still output what you need? Commented Oct 28, 2013 at 11:10
  • Unfortunately no, I do need the condition.
    – user2265
    Commented Oct 28, 2013 at 12:40
0

You may get this to work:

{if game_platforms == "PS3"}PS3{/if} 
{if game_platforms == "PC"}PC{/if} 
{if game_platforms == "XBOX"}XBOX{/if}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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