Ok, my site is made up of Cities and Properties within each city. The usual flow is on the homepage there is a list of Cities, you click a city and it goes through to a City view which will then have a list of Properties, to which you can click through to a Property view.
Well some of my Cities only have 1 property, so I would like the link from City to go directly to the Property view, not the city view.
{exp:channel:entries channel="city" dynamic="no" orderby="city_sort_order" sort="asc"}
<li class="location-box colour-{city_colour}">
<a href="{url_title}">
<div class="location-box colour-{city_colour}">
<figure>
<h1>{title}</h1>
<img src="{city_main_image}" alt="">
</figure>
</div>
</a>
</li>
{/exp:channel:entries}
Any advice?
children
of cities, but the cities arechildren
of properties? Do I get it right?