Here is a simple template:
$def with (name)
Hello $name!Or both are OK?
Another example:
$def tr(values):
<tr>
$for v in values:
<td>$v</td>
</tr>
$def table(rows):
<table>
$for row in rows:
$:row
</table>Thanks:)But I saw some different codes on the same page:Another example:$def tr(values): <tr> $for v in values: <td>$v</td> </tr> $def table(rows): <table> $for row in rows: $:row </table>Here, colon and indentation are used.I'm confused.Of course, the best way to solve this is to test it myself....I just hope the confusion could remind our guys of the ambiguity of the documentation.
Got it!Can we treat the "def with (v1, v2, ...)" as a declaration of all the variables(v1, v2...) that will be used in the template?