Created
April 29, 2011 08:05
-
-
Save navilan/948017 to your computer and use it in GitHub Desktop.
Iterating over events - where integer key is an issue.
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
--- | |
extends: base.j2 | |
title: About BASIC | |
description: The default hyde template | |
events: | |
y2011: | |
- | |
title: "one event" | |
location: "a city" | |
- | |
title: "one event" | |
location: "a city" | |
y2010: | |
- | |
title: "one event" | |
location: "a city" | |
- | |
title: "one event" | |
location: "a city" | |
--- | |
{% block main %} | |
{% for year, event_list in resource.meta.events %} | |
<h3>{{year|replace('y', '')}}</h3> | |
{% for event in event_list %} | |
<p> {{event.title}}, {{event.location}}</p> | |
{% endfor %} | |
{% endfor %} | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment