I need display Stores by Region, by example:
Alabama
- Store X
- Store Y
Idaho
- Store A
- Store B
So:
- I create two channels Stores and Regions.
- In the channel Stores I create a entries field type called storesRegion and check Regions source.
So great! I can create new stores and select where the store is located.
I can display the Regions like this:
{% set relatedRegions = craft.entries.section('regions').relatedTo({
sourceElement: stores,
field: 'storesRegion'
}) %}
{% for region in relatedRegions %}
{{ region }}
{% endfor %}
good but now I need display all the Stores from each Region
this is a good example of what I need: https://www.apple.com/retail/storelist/
this is something related with reverse relations?