案例:http://mtblog.org/categorys.html
我简单的修改了下全部文章汇总页面,将其改为按按类和按月分。
其中类别分类的主体效果如下:
A分类:
A中文章1
A中文章2
B分类:
B中文章1
B中文章2
制作方法:
进入Master Archive Index 也就是archives.html模版。当然你也可以创建一个新的首页模板保留原有的Master Archive Index模版。将其中的主体部分的如下代码:
<div class="archive-date-based archive">替换为下面的代码:
<div class="archive-content">
<ul class="archive-list">
<MTArchiveList archive_type="Individual">
<li class="archive-list-item"><$MTArchiveDate format="%Y.%m.%d"$>: <a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a></li> </MTArchiveList>
</ul>
</div>
</div>
<div class="archive-date-based archive">这样,就在每个类别下显示了该类别的所有文章。若你只要在每个类别中显示5篇,那就把 <MTEntries> 改为 <MTEntries lastn="5">,在末尾添加个“更多”连接到相关类别。
<div class="archive-content">
<MTCategories>
<$MTCategoryLabel$><br />
<MTEntries>
<a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a><br />
</MTEntries>
</MTCategories>
</div>
</div>
也就是在页面中使用这段代码:
<MTCategories>
<$MTCategoryLabel$><br />
<MTEntries>
<a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a><br />
</MTEntries>
</MTCategories>
在<MTCategories>标签中包含<MTEntries>标签。
而后你可以根据本站提供的标签制作能够“按类下移”和“回到顶部”的页面
<div id="pagetop"></div>
本站共有文章 <$MTBlogEntryCount$> 篇,评论 <$MTBlogCommentCount$> 篇,点击下列分类浏览相应类别的文章:
<ul>
<li><MTCategories><a href="#<$MTCategoryLabel dirify="1"$>"><$MTCategoryLabel$></a> | </MTCategories></li>
</ul>
<MTCategories>
<div id="<$MTCategoryLabel dirify="1"$>"><$MTCategoryLabel$> | <a href="#pagetop">回到顶部</a></div>
<ul>
<MTEntries sort_order="descend">
<li><a href="<$MTEntryPermalink$>" target="_self"><$MTEntryTitle$></a> [<$MTEntryCommentCount$>/<$MTEntryTrackbackCount$>]</li>
</MTEntries>
</ul>
</MTCategories>











