<$mt: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 supports the multiblog template tags.

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.

Example ΒΆ

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

This returns

"1 category" or "9 categories" or "No category".
This page was last updated on 2011-05-23, 08:37.

1 Note

You may like to know about the following undocumented attributes for this tag:

singular="1 category" plural="# categories" none="No categories"

Here is a sample of how you could use them:

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

The above would return:

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

You could customize the expressions "category", "categories" and "No categories" from the above attributes.

Enjoy ;)

Leave a note

Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.