- Babble On - http://mt4.juneeonline.com/babble-on/ -

Archive Page with Month and Entry List

Posted By babylon On July 7, 2008 10:20 PM In Template Hacks | 1 Comment

[1] Archive List I've noticed on a few sites the archive page with Month and then the list of post for that month. It took me a while to work out how it was done but finally got it. You can [2] see it in action on my person blog.

It's really quite easy to implement. Go to the Movable Type dashboard in your browser, Design > Templates > Index Templates. Click on the Archive Index template.


Delete all the various archive types after the following line:


<h1 id="page-title" class="archive-title"><$MTGetVar name="page_title"$></h1>

Replace the code with this:


<div class="archive-monthly archive-date-based archive">
<ul>
<MTArchiveList archive_type="Monthly">
<h3 class="archive-header"><a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a></h3>
<ul>
<MTEntries>
<li class="archive-list-item"><a href="<MTEntryPermalink archive_type="Individual">" title="<MTEntryExcerpt>"><MTEntryTitle></a></li>
</MTEntries>
</ul>
</MTArchiveList>
</ul>
</div>

I added [3] custom styles for the archive list as follows:


.archive-header {
    margin-top: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.archive-header a {
text-decoration: none;
}

.archive-list-item {
    list-style: none;
    margin-bottom: 5px;
}

.archive-list-item a{
   text-decoration: none;
}

Be sure to Save and Publish your template and stylesheet changes.


Article printed from Babble On: http://mt4.juneeonline.com/babble-on/

URL to article: http://mt4.juneeonline.com/babble-on/archives/2008/07/archive-page-with-month-and-en.php

URLs in this post:
[1] http://mt4.juneeonline.com/babble-on/images/archive_List.jpg
[2] http://www.bestoday.com.au/archives.php
[3] http://www.learningmovabletype.com/a/how_to_customize_default_styles_in_mt4/

Copyright © July 7, 2008. All rights reserved.