47 lines
933 B
Java
47 lines
933 B
Java
|
<h2>Comments</h2>
|
||
|
<pre><code>## Single line comment
|
||
|
#* Multi-line
|
||
|
comment *#</code></pre>
|
||
|
|
||
|
<h2>Unparsed sections</h2>
|
||
|
<pre><code>## Section below is not parsed
|
||
|
#[[
|
||
|
## This is not a comment
|
||
|
]]#</code></pre>
|
||
|
|
||
|
<h2>Variables</h2>
|
||
|
<pre><code>$mud
|
||
|
$customer.Name
|
||
|
$flogger.getPromo( $mud )
|
||
|
$!{mudSlinger_9}
|
||
|
$foo[0]
|
||
|
$foo[$i]
|
||
|
$foo["bar"]
|
||
|
$foo.bar[1].junk
|
||
|
$foo.callMethod()[1]</code></pre>
|
||
|
|
||
|
<h2>Directives</h2>
|
||
|
<pre><code>#set($foo.bar[1] = 3)
|
||
|
#if($a==1)true enough#{else}no way!#end
|
||
|
#macro( d )
|
||
|
<tr><td>$!bodyContent</td></tr>
|
||
|
#end
|
||
|
#@d()Hello!#end</code></pre>
|
||
|
|
||
|
<h2>Integration with HTML</h2>
|
||
|
<pre><code><html>
|
||
|
<body>
|
||
|
Hello $customer.Name!
|
||
|
<table>
|
||
|
#foreach( $mud in $mudsOnSpecial )
|
||
|
#if ( $customer.hasPurchased($mud) )
|
||
|
<tr>
|
||
|
<td>
|
||
|
$flogger.getPromo( $mud )
|
||
|
</td>
|
||
|
</tr>
|
||
|
#end
|
||
|
#end
|
||
|
</table>
|
||
|
</body>
|
||
|
</html></code></pre>
|