<p>You'll need to reference the field handle within <em>asset</em>.<br>
For instance > <code>{{ asset.imageHandle.getUrl('square') }}</code>.<br>
I'm guessing you aren't seeing <code>{{ asset.title }}</code> either?</p>

CC BY-SA 3.0
2017-10-26T12:01:39.967Z
2017-10-26T12:01:39.967Z
Chris Southam
<p>The issue here was not to do with NEO or how to access them, it was the loop index call to the parent not getting the correct context.</p>

<p><code>{{ loop.parent.index }}</code> was the issue. It needed to be <code>{{ loop.parent.loop.parent.loop.index }}</code></p>

CC BY-SA 3.0
2017-10-26T13:33:53.793Z
2017-10-26T13:33:53.793Z
zizther
<p>Anyone with Neo experience had issues with outputting an assets field with multiple images?
I am not using a dynamic field, as I saw there are issues with that.</p>

<p>Code</p>

<pre><code>{% for asset in block.serviceGallery %}
    &lt;div class="fg-col-xs-6 fg-col-md-4" data-gallery="{{ loop.parent.index }}"&gt;
        &lt;img src="{{ asset.getUrl('square') }}" alt="{{ asset.title }}"&gt;
    &lt;/div&gt;
{% endfor %}
</code></pre>

<p>Error:
<code>Key "index" for array with keys "entry, ... " does not exist.</code></p>

<assets><assetfilemodel><plugin-neo>
Error when outputting assets from a field within a Neo field
# Error when outputting assets from a field within a Neo field

(Asked by: username_0 on 2017-10-26)

Anyone with Neo experience had issues with outputting an assets field with multiple images?
I am not using a dynamic field, as I saw there are issues with that.
Code
{% for asset in block.serviceGallery %}
    
        
    
{% endfor %}

Error:
Key "index" for array with keys "entry, ... " does not exist.

**Tags:** assets, assetfilemodel, plugin-neo


---

## 2 answers

### Answer by username_1 on 2017-10-26. Score: 1

You'll need to reference the field handle within *asset*.  
For instance > `{{ asset.imageHandle.getUrl('square') }}`.  
I'm guessing you aren't seeing `{{ asset.title }}` either?


---

### Answer by username_0 on 2017-10-26. Score: 1

The issue here was not to do with NEO or how to access them, it was the loop index call to the parent not getting the correct context.

`{{ loop.parent.index }}` was the issue. It needed to be `{{ loop.parent.loop.parent.loop.index }}`


---

