Linking and showing archive by month 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) %}
  &lt;ul id="archive"&gt;
  {% for year, entriesInYear in allEntries | group("postDate.year") %}
      &lt;li&gt;&lt;a href=""&gt;{{ year }}&lt;/a&gt;
        &lt;ul&gt;
        {% for month, entries in entriesInYear | group("postDate|date('F')") %}
            &lt;li&gt;&lt;a href=""&gt;{{ month }}&amp;nbsp;({{ entries|length }})&lt;/a&gt;&lt;/li&gt;
        {% endfor %}
        &lt;/ul&gt;
      &lt;/li&gt;
  {% endfor %}
  &lt;/ul&gt;


Using &lt;li&gt;&lt;a href=""&gt;{{ month }}&amp;nbsp;({{ entries|length }})&lt;/a&gt;&lt;/li&gt;  I get the desired result (visually), see attached image.  If I use &lt;li&gt;{{ entry.getLink() }}&lt;/li&gt; 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
So P&amp;T chipped in to help and of course solved my plight immediately :D

For anyone else who might encounter a similar scenario I'm posting the solution.

On the page containing the archive list:

{% set allEntries = craft.entries.section('sectionName').limit(null) %}

&lt;ul id="archive"&gt;
    {% for year, entriesInYear in allEntries | group("postDate.year") %}

        {% set counter = ( counter | default(0) ) + 1 %}

        &lt;li class="year{{ counter }}"&gt;
            &lt;a href="#year{{ counter }}"&gt;{{ year }}&lt;/a&gt;

            &lt;ul&gt;
                {% for month, entries in entriesInYear | group("postDate|date('F')") %}
                    &lt;li&gt;&lt;a href="{{ siteUrl }}path/to-page/{{ month }}-{{ year }}"&gt;{{ month }}&amp;nbsp;({{ entries|length }})&lt;/a&gt;&lt;/li&gt;
                {% endfor %}
            &lt;/ul&gt;
        &lt;/li&gt;

    {% endfor %}
&lt;/ul&gt;


Then on the actual archive page (I added this at the top of the page):

{% set month = craft.request.segment(3) %}
{% set year = craft.request.segment(4) %}

{% set firstDay = now | date_modify('first day of ' ~ month ~ ' ' ~ year ~ ' 00:00:00') %}
{% set lastDay = now | date_modify('last day of ' ~ month ~ ' ' ~ year ~ ' 23:59:59') %}


Then where you want the info to appear:

{% set archive  = craft.entries.section('sectionName').postDate('and', '&gt;= ' ~ firstDay, '&lt;= ' ~ lastDay) %}

&lt;ul&gt;
    {% for entry in archive %}         
        &lt;li&gt;
            &lt;h3&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/h3&gt;
            {{ entry.body }}

            &lt;p class="more"&gt;&lt;a href="{{ entry.url }}"&gt;read more&lt;/a&gt;&lt;/p&gt;

            &lt;div&gt;
                &lt;p&gt;{{ entry.postDate | date("d") }} &lt;span&gt;{{ entry.postDate | date("M") }}&lt;/span&gt;&lt;/p&gt;
            &lt;/div&gt;
        &lt;/li&gt;
    {% endfor %}
&lt;/ul&gt;


Now here's the bit that caused the grief...  Instead of having 'month'-'year' as part of the route, P&amp;T suggested using just '*'.



Or.. as P&amp;T put it:


  Your dynamic route is set with the Month and Year token. If you look at the list of available tokens, you will see that Month and Year follow a specific format, which the URLs you set up in your menu do not follow. Therefore, those URLs do not follow the pattern you set in the Route and you get a 404 page.