1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
<div>
{param other: html}
<span>ici</span>
{@param other: html}
{@param? other: html}
{/param}
</div>
<div>
{switch $numMarbles}
{case 0}
You have no marbles.
{case 1, 2, 3}
You have a normal number of marbles.
{default} // 4 or more
You have more marbles than you know what to do with.
{/switch}
</div>
<div>
{template .example}
/** A leading doc comment. */
{@param name: string}
{@param? height: int} /** A trailing doc comment. */
...
{/template}
</div>
<div>
{call .mySubtemplate}
{param aaa: $aaa /}
{param bbb: $bbb /}
{/call}
{foreach $pair in $pairs}
{call .exampleCallee}
{param largerNum: $pair.largerInt /}
{param smallerNum}
{if $pair.smallerInt}
{$pair.smallerInt} // if defined, pass it
{else}
{$pair.largerInt - 100}
{/if}
{/param}
{/call}
{/foreach}
</div>
|