With a bit of looking around i've got the following code on my News landing page:
{% set allEntries = craft.entries.section('chambersNews').limit(null) %}
<ul id="archive">
{% for year, entriesInYear in allEntries | group("postDate.year") %}
<li><a href="">{{ year }}</a>
<ul>
{% for month, entries in entriesInYear | group("postDate|date('F')") %}
<li><a href="">{{ month }} ({{ entries|length }})</a></li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
Using <li><a href="">{{ month }} ({{ entries|length }})</a></li> I get the desired result (visually), see attached image. If I use <li>{{ entry.getLink() }}</li> I get the result shown on the right of the attached image.
In both instances I only get a link to the first segment (also shown in the attached image).
What I would like to do is have the Months link to a page that lists just the articles from that month (I don't need the year to link).
I assume I need to add a dynamic link into the href but how and what?
Many thanks in advance.
Martin



monthandyeartokens as{{ month }}and{{ year }}, instead of manually setting them. Craft passes your tokens to route templates as their variable, per documentation. – Taylor Daughtry Sep 22 '15 at 15:00I'm not sure if it has any bearing but i'm also using this method for directing Structure entries to their own templates. http://craftcms.stackexchange.com/questions/96/how-can-i-route-a-specific-entry-in-a-structure-section-to-its-own-template
Many thanks
Martin
– Martin Sep 22 '15 at 20:12