I do not believe the EntryAssets tag supports <mt:Else>
, but you can achieve this with a little Movable Type logic.
With some simple tags, you would be able to do something like this:
<mt:If tag="EntryCategory">
<p>Filed under <$mt:EntryCategory$></p>
<mt:Else>
<p>Uncategorized</p>
</mt:If>
But since your block tag, EntryAssets, is a complicated tag taking several template tag modifiers, one of which is also called tag
, this won't work. We can fake it using Movable Type variables like this:
<$mt:Var name="asset_found" value="0"$>
<mt:EntryAssets tag="homepage" type="image" limit="1">
<$mt:Var name="asset_found" value="1"$>
Your code here
</mt:EntryAssets>
<mt:Unless name="asset_found">
Show this if none found
</mt:Unless>
Note the first line where we set the variable asset_found
to 0
is not strictly required by Movable Type, but it's good to reset the variable in case you use this block in multiple places in the same template.