<p>If <code>companyInfo</code> if your global and <code>logo</code> if your Asset field, then you'd use it just like you would <a href="http://buildwithcraft.com/docs/assets-fields#templating" rel="nofollow">anywhere else</a> keeping in mind that all relation fields (Assets, Users, Entries, Tags, Categories, etc.) always return a <em>collection</em> of results.</p>

<p>So, <code>companyInfo.logo.first()</code> will return the first asset and if you want to loop through them all:</p>

<pre><code>{% for image in companyInfo.logo %}
    {{ image.getUrl() }}&lt;br /&gt;        
{% endfor %}
</code></pre>

CC BY-SA 3.0
2015-09-11T16:04:53.683Z
2015-09-11T16:04:53.683Z
Brad Bell
<p>Is it possible to use an Asset field as a Global Set? For example:</p>

<pre><code>{{ companyInfo.logo }}
</code></pre>

<assets><globals>
Use Asset field as a Global Set Variable?
# Use Asset field as a Global Set Variable?

(Asked by: username_0 on 2015-09-11)

Is it possible to use an Asset field as a Global Set? For example:
{{ companyInfo.logo }}

**Tags:** assets, globals


---

## 1 answers

### Answer by username_1 on 2015-09-11. Score: 4 | Accepted answer

If companyInfo if your global and logo if your Asset field, then you'd use it just like you would anywhere else keeping in mind that all relation fields (Assets, Users, Entries, Tags, Categories, etc.) always return a collection of results.
So, companyInfo.logo.first() will return the first asset and if you want to loop through them all:
{% for image in companyInfo.logo %}
    {{ image.getUrl() }}        
{% endfor %}


---

