Spice Command Add Example

This example adds two image commands and then lists the commands.

Smartsite SXML CopyCode image Copy Code
{spice.command.add('img.rotate.degrees', 10)}
{spice.command.add('img.resize.width', 100)}

<se:format inputdata="{spice.command.getall()}" whitespace="simpleformat">
    <se:rowformat>
        <se:colformat> <td>{this.field()}</td>{char.crlf()}</se:colformat>
        <se:rowresult><tr>{char.crlf()}{this.rowresult()}</tr>{char.crlf()}</se:rowresult>
    </se:rowformat>
    <se:resultformat>
        <table>{char.crlf()}{this.result()}</table>
    </se:resultformat>
</se:format>
Example Result CopyCode image Copy Code
<table>
<tr>
 <td>img</td>
 <td>rotate</td>
 <td>degrees</td>
 <td>10</td>
</tr>
<tr>
 <td>img</td>
 <td>resize</td>
 <td>width</td>
 <td>100</td>
</tr>
</table>