I have a Matrix field where one of my child fields is a Dynamic Dropdown that uses the following code to pull in entries:
{% for entry in craft.entries.limit(null).section('dealers').type('online') %}
{ "value":"{{ entry.id }}" , "label":"{{ entry | raw }}"
{% if entry.uri == '__home__' %} , "default":true{% endif %}}
{% if not loop.last %},{% endif %}
{% endfor %}
The Matrix field has a handle of mensPDPLinks
and the child field has a handle of retailer
.
The above code creates a dropdown containing a list of retailers from another section.
When editing an entry containing this field a person can add as many retailers as needed by adding additional Matrix rows. It should be storing the entryID for each of the retailer entries they select. There are additional Matrix child fields to include other data to each retailer they select.
In my templates I'd like to loop through the entries (retailers) they've added in the Matrix field and display some data from the retailers entry.
Can someone point me in a direction? I'm kinda lost as to how I can do this.