I have this in my template:

    {if segment_2}entry_id="not {segment_2}"{/if}
    {if {profession}{profession:title}{/profession} == "foo"}
        <!-- display something -->

This returns the error:


You have an invalid conditional in your template. Please review your conditionals for an unclosed string, invalid operators, a missing }, or a missing {/if}.

Parser State: Invalid Condition: Not enough operands for operator ” == “.

What is wrong with my template? Is the test in my if-statement somehow causing this problem? Is there a way I can add this filter as a search in the channel entry tag?

1 Answer 1


First thing to try is to remove the second conditionl to be sure it's that one which causes the problem.

Try using quotes in your second conditional so it looks like;

{if "{profession}{profession:title}{/profession}" == "foo"}
    <!-- display something -->

Though it would be better to reformat it slightly to:

    {if profession:title == "foo"}
        <!-- display something -->

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.