ブログの年リストを取得

概要

ブログ以下では年単位にマッピングしたアーカイブリストから取得することが可能だが、ウェブサイトから取得する場合は"MTEntries"タグを使用する


サンプル

<MTSetVarBlock name="setThisYear"><$MTDate format="%Y"$></MTSetVarBlock><MTSetVar name="setEntryYear" value="$setThisYear">
<MTEntries include_blogs="3" sort_by="authored_on" sort_order="descend">
      <MTEntriesHeader>
         <h2><MTGetVar name="setEntryYear"></h2>
     </MTEntriesHeader>
      <MTSetVarBlock name="setEntryYear"><$MTEntryDate format="%Y"$></MTSetVarBlock>
      <MTIf name="setThisYear" ne="$setEntryYear">
          </dl>
         <h2><MTGetVar name="setEntryYear"></h2>
         <dl>
         <MTSetVar name="setThisYear" value="$setEntryYear">
      </MTIf>
      <MTEntriesFooter>
         </dl>
     </MTEntriesFooter>
</MTEntries>
 
 

サンプル結果

2010
2009
2008
 




最終更新:2010年11月23日 23:14