I want to get all images from the section projekte
which are bound to the asset field bild
I then want to fiddle around with .limit()
and maybe random
filters.
So I grabbed all images like described here
This works but as soon as I add .limit()
{% set projectImg = craft.entries.section('projekte').find() %}
{% set projectImages = [] %}
{% for item in projectImg %}
{% set currentImage = item.bild %}
{% set projectImages = projectImages | merge(currentImage) %}
{% endfor %}
{% for asset in projectImages.limit(3) %}
<img src="{{ asset.url }}">
{% endfor %}
This results in
PHP Notice: Array to string conversion
Why can't I just ad whatever filter I want on that new loop now?