Entries field templating only when entry is added I have a section type Structure called How to videos, in which I have field type Entries.
Now, when I select &quot;Products&quot; in the field type 'Entries'. I only want the selected Entries Products to show text &quot;Click here to view&quot;. If there is no entry added in entries fields it should not show text &quot;Click here to view&quot;.
How can I template the Entries field?
You'll need to do something like this. entry is a How to videos entry.
{% set relatedProducts = entry.productsEntryField.all() %}

{% if relatedProducts|length %}
    {% for product in relatedProducts %}
        &lt;a href=&quot;{{ product.url }}&quot;&gt;Click here to view&lt;/a&gt;
    {% endfor %}
{% endif %}

The Craft docs on Entries Fields has more info.