Parsing order for field filters
scottplan wrote on 18 Apr 2010 13:34
Text field filters
A filter takes the string value of a property and does something with it, producing a new string. We allow these filters on text fields:
- |upper - converts value to upper case
- |lower - converts value to lower case
- |title - converts value to title case (first letter of each word is capitalized)
- |nnn - truncates value to nnn characters
- |?value - if the value is empty, substitutes with 'value'
- |??truevalue:falsevalue - if property is non-zero or true, show trueval, else show falseval. Applies to all numeric and Boolean properties.
- |url - format value as valid URL (e.g. replacing spaces by %20).
In my project's dataform, I'd like to inject :first if the user leaves an imgURL field empty, and %%author%% if they leave an email field empty. Would the |?value filter allow those items to be compiled, or would they result as uncompiled text?
Start a new sub-thread
page revision: 0, last edited: 18 Apr 2010 13:34