Last active
December 16, 2015 21:00
-
-
Save ruemic/5496813 to your computer and use it in GitHub Desktop.
The Pop Tags template for rendering our a tour date calendar, which organizes tour dates into years and months with a server side extension.
This file contains hidden or 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
<!-- Pull in a collection of tour date entries --> | |
<pop:content from="tour-dates"> | |
<!-- Iterate through a collection of years, each with a 'start' and 'end' attribute --> | |
<pop:years> | |
<!-- Render the Year --> | |
<li> | |
<pop:start format="yyyy" wrap="h2" class="year"/> | |
</li> | |
<!-- Iterate through a collection of months based on the 'start' and 'end' of the Year --> | |
<pop:months start="<pop:start/>" end="<pop:end/>" break="li"> | |
<div class="month"> | |
<!-- Render the Month --> | |
<pop:start format="mmmm" wrap="h2" /> | |
<!-- Interate through the collection of tour dates for this Month --> | |
<pop:entries_for start="<pop:start/>" end="<pop:end/>" wrap="ol"> | |
<!-- Render each tour date and location --> | |
<li> | |
<a href="<pop:permalink/>"> | |
<p class="border-bar"><pop:date format="m/dd"/> — <pop:title/> — <pop:location wrap="span"/></p> | |
</a> | |
</li> | |
</pop:entries_for> | |
</div> | |
</pop:months> | |
</pop:years> | |
</pop:content> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment