I’d also be intrigued to know what the cleaner ways to do this are? It seems very clean and straightforward to use PHX style modifiers...
Author:
ManagerManager plugin - customise your ModX manager interface
Rckt - web development, Sheffield, UK
-
☆ A M B ☆
- 179 Posts
Quote from: splittingred at Aug 17, 2010, 08:26 AM
Without If:
<h1 class="h1-top">[[*longtitle:if=`[[*longtitle]]`:eq=``:then=`[[*pagetitle]]`:else=`[[*longtitle]]`]]</h1>
or even shorter:
<h1 class="h1-top">[[*longtitle:empty=`[[*pagetitle]]`]]</h1>
The drawback to IF over PHX style conditionals is that you can’t chain them, or add multiple conditions.
Author:
ManagerManager plugin - customise your ModX manager interface
Rckt - web development, Sheffield, UK