Get your own customer support community
 

How do you use the "first" filter?

The Edicy developer site documents a filter "first" and "last" which can return the first or last elements of a passed array. The documented example is:


{{ blog.articles | first }}


However, I can't work out for the life of me how to use such a function. "{{ blog.articles | first }}" on its own just returns "#". I assume I need to access the article properties once it's been returned, but how can I do this? I've tried


{{ blog.articles | first }}.title

{{ {{ blog.articles | first }}.title }}

{% for article in {{ blog.articles | first }} %}
{{ article.title }}
{% endfor %}

{{ blog.articles.title | first }}

{{ blog.articles.article.title | first }}

{{ blog.articles | first.title }}


and everything in-between. None of it works. How do you use this filter?

Thanks.
 
sad I’m frustrated
Inappropriate?
1 person has this question

User_default_medium