Last active
August 29, 2015 14:05
-
-
Save 1stevengrant/86b62353a2bb740c1441 to your computer and use it in GitHub Desktop.
This code loops through sessions that are set as a workshop, groups them by workshop round, orders them by title and lists the related speaker for a session
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set allWorkshops = craft.entries.section('session').sessionType('Workshop').order('sessionRound','title') %} | |
{% set allWorkshopsByRound = allWorkshops|group('sessionRound') %} | |
{% for round, workshopsInRound in allWorkshopsByRound %} | |
<h3 class="round">Round {{ round }}</h3> | |
{% for entry in workshopsInRound %} | |
{% set speaker = entry.sessionSpeaker.first() %} | |
<div class="talk"> | |
<h4>{% for speaker in entry.sessionSpeaker %}{{ speaker.speakerFirstName }} {{ speaker.title }}{% if not loop.last %}, {% endif %}{% endfor %} | {{ entry.title }}</h4> | |
{{ entry.sessionOverview }} | |
</div> | |
<!-- // .talk --> | |
{% endfor %} | |
{% endfor %} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks good to me. What is bothering you ?
group
filterasc
,desc
for orderlength
filter