AssetCount

Returns the number of assets associated with the active blog.

Attributes:

type

Allows for filtering by file type. Built-in types supported are "image", "audio", "video". These types can be extended by plugins.

Example:

    Images available: <$mt:AssetCount type="image"$>
This page was last updated on 2007-10-01, 16:22.  

1 Note

If you have an image asset with thumbnails, this tag returns a count that includes both of them. If you want to only count images, a good want to do that is to use the MTAssets and MTSetVar tag like so (it loops through MTAssets - which only returns images, and not thumbnails - and increments the $asset_count variable which you can then use):

<$mt:SetVar name="asset_count" value="0"$>
<mt:Assets>
   <$mt:SetVar name="asset_count" op="++">
</mt:Assets>

# Assets: <$mt:Var name="asset_count">

Leave a note