Not a developer? Go to MovableType.com

Documentation

BlogCategoryCount

Returns the number of categories associated with a blog.

If a blog has 4 categories, using the following tag will output “4”:

<mt:BlogCategoryCount>

This template tag also supports all of the same filtering mechanisms defined by the mt:Categories tag allowing users to retrieve a count of the number of comments on a blog that meet a certain criteria.

MultiBlog Attributes

This template tag supports the multiblog template tags.

Count Attributes

singular

Allows special formatting for when the number of published objects is equal to 1.

<mt:BlogCategoryCount singular="1 entry">

plural

Allows special formatting for when the number of published objects is greater than 1. # is automatically replaced with the number of objects.

<mt:BlogCategoryCount plural="# entries">

none

Allows special formatting for when the number of published objects is 0 (zero).

<mt:BlogCategoryCount none="No entries">

or

<mt:BlogCategoryCount none="None">

Example

<mt:BlogCategoryCount singular="1 category" plural="# categories" none="No category">

This returns

"1 category" or "9 categories" or "No category".
Back