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