Last active
August 29, 2015 14:16
-
-
Save bobdenotter/6be8e093eefa884ab4a6 to your computer and use it in GitHub Desktop.
Twig example
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
if you have a route like `/events/{year}/{month}/{day}`, use this in your template: | |
{% set date = app.request.get('year') ~ '-' ~ app.request.get('month') ~ '-' ~ app.request.get('day') %} | |
{% setcontent events = "events" where { 'date': date } %} | |
{% for event in events %} | |
.. | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment