Skip to content

Instantly share code, notes, and snippets.

@fmoliveira
Forked from rek/gist:f18a7e38b8e4e3686584
Last active August 29, 2015 14:18
Show Gist options
  • Save fmoliveira/bfe7871fad9dfafad49f to your computer and use it in GitHub Desktop.
Save fmoliveira/bfe7871fad9dfafad49f to your computer and use it in GitHub Desktop.
{?cond}
cond is true
{:else}
cond is not true
{/cond}
{^cond}
cond is false
{:else}
cond is not false
{/cond}
{#loop}
<label>{something}{~n}
<option value="{value}" {@eq key=value value=courseName}selected="true"{/eq}>{label}</option>
</label>
{:else}
show if loop empty
{/loop}
{>partial_name /}
{>"flowViews/flowView{flowName}" /}
{@select key=\"{foo}\"}
{@eq value=\"bar\"}foobar{/eq}
{@eq value=\"baz\"}foobaz{/eq}
{@default} - default Text{/default}
{/select}
{@select key=foo}
{@gte value=5}foobar{/gte}
{/select}
{@if cond="{x} < {y} && {b} == {c} && '{e}'.length || '{f}'.length"}
<div> x is less than y and b == c and either e or f exists in the output </div>
{/if}
{@size key="xxx" }
My friends are:
{#friends}
{name}{@sep},{/sep}
{/friends}
The {@sep} helper tag will output it's body content unless this is the final iteration of the containing loop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment