MTSubCatsRecurse
現在のカテゴリに属するサブカテゴリの MTSubCategories ブロックを再帰的に表示します。モディファイア max_depth で、再帰的に表示する深さを指定できます。max_depth="1" と指定すると、このカテゴリの下のサブカテゴリを表示しません。
使い方
<MTTopLevelCategories>
<MTSubCatIsFirst>
<ul>
</MTSubCatIsFirst>
<MTIf tag="CategoryCount">
<li><a href="<$MTCategoryArchiveLink$>"<MTIf tag="CategoryDescription"> title="<$MTCategoryDescription remove_html="1" encode_html="1"$>"</MTIf>><$MTCategoryLabel$> (<$MTCategoryCount$>)</a>
<MTElse>
<li><$MTCategoryLabel$>
</MTIf>
<$MTSubCatsRecurse$>
</li>
<MTSubCatIsLast>
</ul>
</MTSubCatIsLast>
</MTTopLevelCategories>
モディファイア
- max_depth="N"
-
展開する繰り返し数を指定します。直下のサブカテゴリのみ展開するときは max_depth="1"、孫カテゴリまで展開するときは max_depth="2" を指定します。
MTSubCatsRecurse と関連のあるテンプレートタグ (38)
- MTArchiveCategory
- MTBlogCategoryCount
- MTCategories
- MTCategoryArchiveLink
- MTCategoryBasename
- MTCategoryCount
- MTCategoryCustomFieldDescription
- MTCategoryCustomFieldName
- MTCategoryCustomFields
- MTCategoryCustomFieldValue
- MTCategoryDescription
- MTCategoryID
- MTCategoryIfAllowPings
- MTCategoryLabel
- MTCategoryNext
- MTCategoryPrevious
- MTCategoryTrackbackCount
- MTCategoryTrackbackLink
- MTEntriesWithSubCategories
- MTEntryAdditionalCategories
- MTEntryCategories
- MTEntryCategory
- MTEntryIfCategory
- MTEntryPrimaryCategory
- MTHasNoParentCategory
- MTHasNoSubCategories
- MTHasParentCategory
- MTHasSubCategories
- MTIfCategory
- MTParentCategories
- MTParentCategory
- MTSubCategories
- MTSubCategoryPath
- MTSubCatIsFirst
- MTSubCatIsLast
- MTSubCatsRecurse
- MTTopLevelCategories
- MTTopLevelParent


