AssetProperty

Type: function

Returns the additional metadata of the asset in context. Some of these properties only make sense for certain file types. For example, image_width and image_height apply only to images.

Attributes

  • property: Specifies what property to return from the tag.

Supported values:

  • file_size: asset's file size
  • format: numeric format. used in conjunction with file_size property. Supported values: 0 (return raw size), 1 (auto format depending on the size), k (KB), m (MB). Defaults to 1.
  • image_width: asset's width (for image only; otherwise returns 0)
  • image_height: asset's height (for image only; otherwise returns 0)
  • description: asset's description

Example

<ul>
<mt:Assets type="image" tag="cool" lastn="10">
    <li><img
        src="<mt:AssetURL />" 
        height="<mt:AssetProperty property="image_height" />"
        width="<mt:AssetProperty property="image_width" />"
    />(<mt:AssetProperty property="file_size" format="1" />)</li>
</mt:Assets>
</ul>
This page was last updated on 2008-05-16, 14:14.  

Leave a note