Hi,
I have the following code in my blueprint:
stockists:
label: Stockists
type: structure
entry: >
{{name}}<br>{{address}}<br>{{website}}
fields:
name:
label: Name
type: text
city:
label: City
type: text
website:
label: Website
type: url
and I want to get the following code my template
<ul>
<li>
<h2>New York</h2>
<ul>
<li>
<a href="http://some-website.com">
Some Stockist
</a>
</li>
<li>
<a href="http://some-website.com">
Some Stockist
</a>
</li>
<li>
<a href="http://some-website.com">
Some Stockist
</a>
</li>
<li>
<a href="http://some-website.com">
Some Stockist
</a>
</li>
</ul>
</li>
<li>
<h2>Tokyo</h2>
<ul>
<li>
<a href="http://some-website.com">
Some Stockist
</a>
</li>
<li>
<a href="http://some-website.com">
Some Stockist
</a>
</li>
<li>
<a href="http://some-website.com">
Some Stockist
</a>
</li>
<li>
<a href="http://some-website.com">
Some Stockist
</a>
...
Essentially i want to get the available cities within the available structure field entries and then use those to group the entries by city.
Any ideas on how this could be done?
Thanks in advance