Chapter 3: Templates and Layout
Publishing Content When a Conditional is False
Problem
You want to publish some content when a conditional is false.
Solution
Use the MTElse tag inside of the container tag.
Discussion
As discussed in the introduction to this chapter, conditionals are a
special form of container tags that will display their contents only if a
certain condition is true. Movable Type includes MTElse, a
very useful tag that can be used with conditional tags. Inside of any
conditional, this tag will display its contents if the conditional is
false. This template markup demonstrates its use.
<MTEntryIfExtended>
<p>TRUE</p>
<MTElse>
<p>FALSE</p>
</MTElse>
</MTEntryIfExtended>
Used in the context of an entry, "TRUE" would be published if the Extended Body field contained any content. "FALSE" would be published if it did not.



