Skip to content

Instantly share code, notes, and snippets.

@beckysoll
Created October 24, 2013 19:45
Show Gist options
  • Save beckysoll/7143749 to your computer and use it in GitHub Desktop.
Save beckysoll/7143749 to your computer and use it in GitHub Desktop.
Is it possible to compare data from multiple rows of a grid, see if they are the same, and hide the duplicates?
<div id="event">
<ul class="menu-list__event">
{{entries:listing folder="events" show_future="yes" show_past="yes" conditions="venue:allen"}}
{{if total_results==!0}}
{{if first}}
<li class="{{venue}}">
<span class="menu-list-header">In the Allen Room</span>
<ul>
{{endif}}
<li>
<span class="menu-dates">
{{datetimes limit="1"}}
{{date format="D. M. j"}} <!-- THIS LINE RIGHT HERE is pulling in the dates - right now i have it limited to 1 date as a temporary solution but i'd like to have it list all dates from that grid (with an ampersand in between) but not list multiple dates if they are the same. -->
{{/datetimes}}
</span>
<em class="artist-name">
{{if shorttitle}}
{{shorttitle}}
{{else}}
{{title}}
{{endif}}
</em>
</li>
{{if last}}
</ul>
</li>
{{endif}}
{{endif}}
{{/entries:listing}}
{{entries:listing folder="events" show_future="yes" show_past="yes" conditions="venue:penthouse"}}
{{if total_results==!0}}
{{if first}}
<li class="{{venue}}">
<span class="menu-list-header">In the Penthouse</span>
<ul>
{{endif}}
<li>
<span class="menu-dates">
{{datetimes limit="1"}}
{{date format="D. M. j"}}
{{/datetimes}}
</span>
<em class="artist-name">
{{if shorttitle}}
{{shorttitle}}
{{else}}
{{title}}
{{endif}}
</em>
</li>
{{if last}}
</ul>
</li>
{{endif}}
{{endif}}
{{/entries:listing}}
{{entries:listing folder="events" show_future="yes" show_past="yes" conditions="venue:atrium"}}
{{if total_results==!0}}
{{if first}}
<li class="{{venue}}">
<span class="menu-list-header">In the Atrium</span>
<ul>
{{endif}}
<li>
<span class="menu-dates">
{{datetimes limit="1"}}
{{date format="D. M. j"}}
{{/datetimes}}
</span>
<em class="artist-name">
{{if shorttitle}}
{{shorttitle}}
{{else}}
{{title}}
{{endif}}
</em>
</li>
{{if last}}
</ul>
</li>
{{endif}}
{{endif}}
{{/entries:listing}}
</ul>
</div>
title: Event Page
fields:
shorttitle:
display: Abbreviated Event Title
type: text
datetimes:
display: Event Date(s) & Time(s)
type: grid
fields:
date:
display: Event Date
type: date
time:
display: Event Start Time
type: text
guid:
display: SRO GUID
type: text
venue:
display: Event venue
type: select
options:
allen: Allen Room
penthouse: Stanley H. Kaplan Penthouse
atrium: David Rubenstein Atrium
genre:
display: Genre(s)
type: suggest
options:
broadway: Broadway
country: Country
crossover: Crossover
folk: Folk
gospel: Gospel
indie: Indie Rock
pop: Pop
songwriter: Songwriter
coverphoto:
display: Event Page Cover Photo
type: file
allowed: [png, jpg, jpeg]
destination: assets/img/cover-photos
photocredit:
display: Cover Photo Credit
type: text
content:
display: Event Description
type: redactor
fineprint:
display: Fine Print (sponsors, co-producers, live from LC etc.)
type: text
details:
display: Details (program notes, song list etc.)
type: grid
fields:
file:
type: file
allowed: [pdf]
destination: assets/img/download/
title:
display: File Link Title
type: text
links:
display: Artist links
type: grid
fields:
link:
display: Link URL
type: text
title:
display: Link Title
type: text
watch:
display: Watch Embed Code
type: textarea
listen:
display: Listen Embed Code
type: textarea
look:
display: Look (artist photo galleries)
type: grid
fields:
file:
type: file
allowed: [png, jpg, jpeg]
destination: assets/img/artist-galleries/
stupid:
type: text
display: ignore me
alsolike:
display: You Might Also Like
type: suggest
create: true
content:
folder: events
label: title
value: url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment