Entry Archives, Grouped by Month in Movable Type

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.

Previous grouped by month published

On many occassions I searched the web, support forums and wikis looking for a solution, yet 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.

Previous
Next

Remarks

Thank you so much for that. I've been struggling with exactly the same problem for several days.

Ben's Gravatar Ben 12 May 2010
11:15 PM

Add Your Remarks

Required
Required but not published