Create a list using a string.split("<p>"). how can i spare and get the value per position using only smart values in a new variable.
{{#cleanList}}<tr> <td style="text-align: center;">{{index}}</td> <td> <strong>{{"value from index"}}</strong> </td> </tr> {{/}}
list
potatoes<p>carrots<p>Onions
expected
|0|potatoes|
|1|carrots|
|2|Onions|
getting
|0||
|1||
|2||
When iterating a smart value list with unnamed attributes, the current item may be referred to directly as {{.}} or used as an implied value in some functions.
For example:
potatoes<p>carrots<p>Onions
{{#varMyList.split("<p>")}}
<tr>
<td style="text-align: center;">{{index}}</td> <td> <strong>{{.}}</strong> </td>
</tr>
{{/}}
To learn more about list iteration, please see these combined examples in the documentation:
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.