JavaScriptをテンプレートに作成
出力ファイル名menu.js
function makemenu(Cid){
<mt:TopLevelCategories>
<mt:SubCatIsFirst>
document.write(' <ul>');
</mt:SubCatIsFirst>
<mt:If tag="CategoryCount">
document.write(' <li class="mysubcategory">●<a href="<$mt:CategoryArchiveLink$>">'+"<$MTCategoryLabel pmhc=""$> (<$mt:CategoryCount$>)</a>");
if(<$MTCategoryID$> == Cid || "<$MTCategoryLabel pmhc=""$>" == Cid){
<MTEntries sort_by="title" sort_order="ascend">
document.write('<li class="myentrytitle">└<a href="<$MTEntryPermalink$>">'+"<$MTEntryTitle pmhc=""$></a></li>");
</MTEntries>
}
<mt:Else>
document.write(' <li class="mytopcategory">●<$MTCategoryLabel pmhc=""$>');
</mt:If>
<$mt:SubCatsRecurse$>
document.write(' </li>');
<mt:SubCatIsLast>
document.write(' </ul>');
</mt:SubCatIsLast>
</mt:TopLevelCategories>
}
アーカイブウィジェットグループ
<mt:If name="category_archive">
<$mt:Include widget="カテゴリアーカイブJS展開"$>
<mt:ElseIf name="entry_template">
<$mt:Include widget="カテゴリアーカイブJS展開2"$>
<mt:Else>
<$mt:Include widget="カテゴリアーカイブJS"$>
</mt:If>
ウィジェットカテゴリアーカイブJS
カテゴリアーカイブJS展開
<mt:IfArchiveTypeEnabled archive_type="Category">
<div class="widget-archive widget-archive-category widget">
<h3 class="widget-header">エントリー一覧</h3>
<div class="widget-content">
</div>
</div>
</mt:IfArchiveTypeEnabled>
カテゴリアーカイブJS展開2
<mt:IfArchiveTypeEnabled archive_type="Category">
<div class="widget-archive widget-archive-category widget">
<h3 class="widget-header">エントリー一覧</h3>
<div class="widget-content">
</div>
</div>
</mt:IfArchiveTypeEnabled>