Entry Archives, Grouped by Month in Movable Type

Previous grouped by month published

I have been using Movable Type for a number of years, yet the template code required to present an archived list of entries, grouped by month has always evaded me. On many occassions I searched support forums and wikis looking for a solution the common concencus was that this was impossible to achieve without plug-ins and complicated logic.

However during the recent redesign of this site, another desparate search finally returned the answer. I’ve misplaced the link to the original solution, so as much for my benefit as maybe yours, here is the humble code:

  1. <h1>Archive</h1>
  2. <mt:ArchiveList archive_type="Monthly">
  3. <mt:Entries>

  4. <mt:EntriesHeader>
  5. <h2><a href="<mt:ArchiveLink/>">
  6. <mt:EntryDate format="%B %Y"$/>
  7. </a></h2>
  8. <ul>
  9. </mt:EntriesHeader>

  10. <li><a href="<mt:EntryPermalink/>">
  11. <mt:EntryDate format="%d"/> - <mt:EntryTitle/>
  12. </a></li>

  13. <mt:EntriesFooter>
  14. </ul>
  15. </mt:EntriesFooter>

  16. </mt:Entries>
  17. </mt:ArchiveList>

This is the first time I’ve posted a chuck of code to my blog, yet in terms of Movable Type templates, it’s probably the last. Issues like this, as well as the fairly stagnent development of the platform and a dwindling community is no match against competing tools like WordPress and ExpressionEngine—I’m pretty sure I will transition to one of these services before the end of the year.


See the discussion on this article

2 remarks contributed

Related Posts

  • Unmovable Headache

    This blog continues to become more refined as I better understand the system that builds it, Movable Type.

  • Two Years

    Two years ago I joined Clearleft. Now with the responsive design movement in full swing, I look back over the last two years to see how much my approach to web design has changed.

  • URLs Matter

    The humble URL has been on my mind a lot recently.