Simple Row Formatting
Release 1.0 - ...
Macros that returns a datatable containing some rows and columns with data such as SqlQuery, can use rowformatting to format the data in a universal way. In its simplest form, these macros can be used with the following parameters:
- Rowformat
- Rowdelimiter
- RowCount
- SkipRows
These parameters can be used both in attribute form or in xml form. The attribute form is convenient when you don't have any html elements in the parameter value, the xml form is more verbose but easier to read when you do have html elements in the parameter value.
Example 1:
Smartsite SXML | Copy Code |
---|---|
<se:xlinks parent="screwdrivers" rowformat="{this.field(title)}" rowdelimiter=", " /> |
Example 2:
Smartsite SXML | Copy Code |
---|---|
<se:xlinks parent="screwdrivers"> <se:parameters> <se:parameter name="rowformat"> <li> {this.field(title)} </li> </se:parameter> <se:parameter name="resultformat"> <ul> {this.result()} </ul> </se:parameter> </se:parameters> </se:xlinks> |