1

I have the following code in my templates:

{exp:channel:entries channel="cover" limit="5"}
    {if total_results > 1}More than one{/if}
        {covervid_bg_video limit="1"}{file:url}{/covervid_bg_video}
{/exp:channel:entries}

And here is the error that I get:

Parse error:  syntax error, unexpected T_ENDIF in 
/home/user34/public_html/dev/system/expressionengine/libraries/Functions.php(689) : eval()'d code on line 718

I tried the following variation with no success

    {if '{total_results}' > '1'}More than one{/if}

1 Answer 1

1

If it did work it would output "more than one" 5 times.

I'd use count instead, like this:

{if count==2}More than one{/if}

There's this is interesting article over at ellislabs from some years back but still relevant.

Your Answer

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

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