Having issues trying to access the year & month variable when grouping entries by month-year. The code is outputting the desired results (ie. December 2014), however I would like to format the url by 'year/month'.
Archives
Browse news & articles for the last year.
{% set allEntries = craft.entries.section('news').limit(null) %}
<ul>
{% for date, entries in allEntries | group('postDate|date("F Y")') %}
<li><a href="{{ year }}/{{ month }}">{{ date }}</a></li>
{% endfor %}
</ul>
date
variable and Douglas use the DateTime objectdate
filter recognizes. I added a code snippet that I hope illustrates this helpfully.