Not a developer? Go to MovableType.com

Documentation

Else

A container tag used within If and Unless blocks to output the alternate case.

This tag supports all of the attributes and logical operators available in the If tag and can be used multiple times to test for different scenarios.

Example

Simple if-else use:

<mt:If name="fruit">
    'fruit' is assigned
<mt:Else>
    'fruit' is not assigned
</mt:If>

Else can also be used to test for multiple values:

<mt:If name="fruit" eq="apple">
    It's an apple!
<mt:Else name="apple" eq="banana">
    It's a banana!
<mt:Else>
    It's not an apple or banana, but it is a fruit!
</mt:If>
Back

Leave a Comment