movabletypeでカテゴリアーカイブ、月間アーカイブのリストのテンプレ
movabletypeでカテゴリアーカイブ、月間アーカイブのリストのテンプレです。自分でまとめてなくてまた作ってしもうたのでメモしときます。
月間アーカイブ:
<mt:IfArchiveTypeEnabled archive_type="Monthly"> <div class="list-wrap"> <mt:ArchiveList archive_type="Monthly"> <mt:ArchiveListHeader> <h2>月別アーカイブ</h2> <div class="list"> <ul> </mt:ArchiveListHeader> <li><a href="<$mt:ArchiveLink$>"><$mt:ArchiveTitle$></a></li> <mt:ArchiveListFooter> </ul> </div> </mt:ArchiveListFooter> </mt:ArchiveList> </div> </mt:IfArchiveTypeEnabled>
カテゴリアーカイブ:
<mt:IfArchiveTypeEnabled archive_type="Category"> <div class="list-wrap"> <h2>カテゴリ一覧</h2> <div class="list"> <mt:TopLevelCategories> <mt:SubCatIsFirst> <ul> </mt:SubCatIsFirst> <mt:If tag="CategoryCount"> <li><a href="<$mt:CategoryArchiveLink$>" title="<$mt:CategoryDescription$>"><$mt:CategoryLabel$></a> <mt:Else> <li><$mt:CategoryLabel$> </mt:If> <$mt:SubCatsRecurse$> </li> <mt:SubCatIsLast> </ul> </mt:SubCatIsLast> </mt:TopLevelCategories> </div> </div> </mt:IfArchiveTypeEnabled>
それぞれのアーカイブテンプレートをしっかりと作ってからになります。