MTSubCategories
サブカテゴリを階層化してリスト表示するブロックタグです。
使い方
<MTSubCategories>
<!-- do something -->
</MTSubCategories>
モディファイア
include_current="1"
現在のカテゴリもリストに表示する場合に指定します。
top="0 | 1"
1を指定すると、最上位のトップカテゴリーからリストを表示します。mt:TopLevelCategories と同様の挙動となります。
category="category_foo"
特定のカテゴリのサブカテゴリを表示したいときに使用します。
<mt:SubCategories category="Italian">
<!-- do something -->
</mt:SubCategories>
同じ名前のカテゴリが別の階層にある場合は、親カテゴリ/サブカテゴリと記述して、異なるカテゴリを指定します。
<mt:SubCategories category="Restaurants/Italian">
<!-- do something -->
</mt:SubCategories>
<mt:SubCategories category="Recipes/Italian">
<!-- do something -->
</mt:SubCategories>
カテゴリ名のなかに/が含まれる場合は、[]で囲みます。
<mt:SubCategories category="Restaurants/[Indian/Pakistani]">
<!-- do something -->
</mt:SubCategories>
sort_by="user_custom" 
MT5.1で追加されました。標準の値は、sort_by="user_custom"です。管理画面で並び替えた順番で、カテゴリの一覧を出力します。user_custom以外にも、次の値を指定することができます。この場合、管理画面で設定した並び順を無視し、指定した値でソートします。
- label : 「カテゴリ名」
- description : 「説明」
- basename : 「出力ファイル/フォルダ名」
- created_on : 「作成日」
- modified_on : 「更新日」
- user_custom : 管理画面の並びかえ順(標準)
sort_order="ascend | descend"
並べる順序を指定します。ascend を指定すると昇順、descend は降順になります。
<mt:SubCategories sort_by="label" sort_order="descend">
</mt:SubCategories>
このブロックタグ内で、<mt:CategoryPrevious>タグ、および<mt:CategoryNext>タグを利用した場合は、sort_byで指定した順番で、前と次のカテゴリを表示します。
sort_method="sub_foo"
Perl のメソッド名を使って並び替えます。
Updated on 2011-05-13, 18:49 .

