Q:

Return a conditional if statement based on list length

I am trying to create a conditional if function that displays a result if the length of the list is greater than 5:
{% if length(photos) > 5 %}
...
{% endif %}

However, I get Could not parse the remainder: '(photos)' from 'length(photos)', where am I going wrong?
Thanks

A:

Correct syntax is:
{% if photos|length > 5 %}
...
{% endif %}

