How do I access a custom Asset field within an Assets field? I want to setup a custom field to assign a URL for an image.  On the front end I want to output the image and then wrap it in a URL. I've setup a field called 'logoURL' but not sure how to access that data.  What I have isn't working and I've tried several variations.

{% set logo = { width: 175, height: 120, mode: 'fit' } %}

{% for image in entry.logos %}
    &lt;li&gt;
        &lt;a href="{{ logos.logoURL }}"&gt;&lt;img src="{{ image.getUrl(logo) }}" height="{{ image.getHeight(logo) }}" width="{{ image.getWidth(logo) }}" alt="{{ image.title }}"&gt;&lt;/a&gt;          
    &lt;/li&gt;
{% endfor %}
You’re close. When you do this:



{% for image in entry.logos %}
    ...
{% endfor %}


The code within the for-loop will be repeated for each asset that was assigned to your entry.logos field. Each time, the image variable will be assigned the current asset.

So, if you want to access a field that is on the asset (e.g. your logoUrl field), you would access that via image.logoUrl rather than logos.logoUrl. (You don’t actually have a variable named logos, so if you have Dev Mode enabled, that template would be giving you an error about that.)

{% set logo = { width: 175, height: 120, mode: 'fit' } %}

{% for image in entry.logos %}
    &lt;li&gt;&lt;a href="{{ image.logoURL }}"&gt;&lt;img src="{{ image.getUrl(logo) }}" height="{{ image.getHeight(logo) }}" width="{{ image.getWidth(logo) }}" alt="{{ image.title }}"&gt;&lt;/a&gt;&lt;/li&gt;
{% endfor %}