Skip to content

Instantly share code, notes, and snippets.

@jamiepittock
Last active January 4, 2016 05:59
Show Gist options
  • Save jamiepittock/8579243 to your computer and use it in GitHub Desktop.
Save jamiepittock/8579243 to your computer and use it in GitHub Desktop.
Unique venues
{exp:stash:set_list name="venues" parse_tags="yes" parse_conditionals="yes" trim="yes"}
{exp:channel:entries channel="events" dynamic="no" show_future_entries="yes"}
{if cf_events_place}
{stash:venue_title}{cf_events_place}{title}{/cf_events_place}{/stash:venue_title}
{stash:venue_id}{cf_events_place}{entry_id}{/cf_events_place}{/stash:venue_id}
{/if}
{/exp:channel:entries}
{/exp:stash:set_list}
<select>
{exp:stash:get_list unique="yes" name="venues" trim="yes"}
<option value="{venue_id}">{venue_title}</option>
{/exp:stash:get_list}
</select>
@croxton
Copy link

croxton commented Jan 23, 2014

Ah, could be module updates button wasn't run last time you upgraded Stash? Some changes were made to the db tables a few versions back.

@jamiepittock
Copy link
Author

Yeah maybe. Other stashes on other pages were working ok though. It was just the inclusion of parse_tags and parse_conditionals that seems to throw it out.

Anyway, thanks again. I'll let you know if it happens again and I can replicate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment