カテゴリを制御するタグ
使用例
<!-- カテゴリ一覧表示 -->
<DnetCategories>
カテゴリID:<DnetCategoryID><br />
カテゴリ名:<DnetCategoryLabel><br />
カテゴリリンク:<DnetCategoryArchiveLink><br />
カテゴリの記事数:<DnetCategoryCount><br />
</DnetCategories>
<!--カテゴリ・ここから -->
<DnetCategories show_empty="1">
<DnetIfNonZero tag="DnetCategoryCount">
ID:<DnetCategoryID>:<a href="<DnetCategoryArchiveLink>"><DnetCategoryLabel>(<DnetCategoryCount>)</a><br />
<DnetElse>
ID:<DnetCategoryID>:<DnetCategoryLabel><br />
</DnetElse>
</DnetIfNonZero>
</DnetCategories>
<!--カテゴリ・ここまで -->
※DnetIfNonZeroはtagで指定したDnetCategoryCountが0でないか判定するタグです。
※DnetElseはDnetIfNonZeroの条件に当てはまらない場合、中身を表示するタグです。
DnetCategories
メインページ | 使用可能 |
---|---|
記事別ページ | 使用可能 |
アーカイブ・カテゴリ別ページ | 使用可能 |
使用方法
<DnetCategories> ~ </DnetCategories>
説明
カテゴリを制御します。
「show_empty="1"」で属性を設定することができます。
補足
カテゴリ一覧を表示するためのタグです。
開始タグから終了タグまでをループして表示します。
「show_empty="1"」を設定すると、カテゴリの記事が0件でも一覧に表示されます。
DnetCategoryID
メインページ | 使用可能 |
---|---|
記事別ページ | 使用可能 |
アーカイブ・カテゴリ別ページ | 使用可能 |
使用方法
<DnetCategoryID>
説明
カテゴリのIDが表示されます。
補足
DnetCategoriesのタグの間に指定して下さい。
DnetCategoryLabel
メインページ | 使用可能 |
---|---|
記事別ページ | 使用可能 |
アーカイブ・カテゴリ別ページ | 使用可能 |
使用方法
<DnetCategoryLabel>
説明
カテゴリ名が表示されます。
補足
DnetCategoriesのタグの間に指定して下さい。
DnetCategoryArchiveLink
メインページ | 使用可能 |
---|---|
記事別ページ | 使用可能 |
アーカイブ・カテゴリ別ページ | 使用可能 |
使用方法
<DnetCategoryArchiveLink>
説明
カテゴリアーカイブへのリンクが表示されます。
補足
DnetCategoriesのタグの間に指定して下さい。