ResultFormat and Default
Release 1.0 - ...
ResultFormat and Default are the shared formatting parameters that apply to every macro. If a macro yields a result, the ResultFormat is applied to the result. If the macro yields no result, the Default parameter is applied to the result of the macro.
Example 1:
Smartsite SXML | Copy Code |
---|---|
<se:itemdata field="title" resultformat="<h1>{this.result()}</h1>"/> |
Example 2:
Smartsite SXML | Copy Code |
---|---|
<se:itemdata field="description"> <se:parameters> <se:parameter name="resultformat"> <h1>{this.result()}</h1> </se:parameter> <se:parameter name="default"> <h1>No description</h1> </se:parameter> </se:parameters> </se:itemdata> |