I'm getting an error if my relationship field does not have any related entries selected:
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 ” > “.
The code throwing the error:
{if {select_testimonials:count} > 0} <--conditional open
{select_testimonials} <--relationship field open
{select_testimonials:testimonial} <--relationship:matrix field open
<div class="testimonial">...stuff...</div>
{/select_testimonials:testimonial} <--relationship:matrix field close
{/select_testimonials} <--relationship field close
{/if} <--conditional close
What I'm trying to do here is only show this if there are related entries selected (I don't want an empty div if not).
If the relationship filed does have entries selected, everything works as expected.
What would be causing this error?
I have also tried removing everything but the conditional, and I still get the error, like this:
{if {select_testimonials:count} > 0} <--conditional open
{/if} <--conditional close