2020-06-07 20:03:18 +00:00
|
|
|
Simple select{~n}
|
|
|
|
============={~n}
|
|
|
|
{@select key=pet}
|
|
|
|
{@eq value="cat"}Lets name your pet fluffy{~n}{/eq}
|
|
|
|
{@eq value="dog"}Lets name your pet rover{~n}{/eq}
|
|
|
|
{@eq value="lizard"}Lets name your pet dave{~n}{/eq}
|
|
|
|
{/select}
|
|
|
|
|
|
|
|
non-comparison bodies inside select{~n}
|
|
|
|
==================================={~n}
|
|
|
|
{@select key=pet}
|
|
|
|
text not inside a comparison{~n}
|
|
|
|
{@eq value="cat"}Lets name your pet fluffy{~n}{/eq}
|
|
|
|
{@eq value="dog"}Lets name your pet rover{~n}{/eq}
|
|
|
|
{@eq value="lizard"}Lets name your pet dave{~n}{/eq}
|
|
|
|
{/select}
|
|
|
|
|
|
|
|
@any{~n}
|
|
|
|
===={~n}
|
|
|
|
{@select key=pet}
|
|
|
|
{@any}{person} has a pet!{~n}{/any}
|
|
|
|
{@eq value="cat"}Lets name your pet fluffy{~n}{/eq}
|
|
|
|
{@eq value="dog"}Lets name your pet rover{~n}{/eq}
|
|
|
|
{@eq value="lizard"}Lets name your pet dave{~n}{/eq}
|
|
|
|
{/select}
|
|
|
|
|
|
|
|
@none{~n}
|
|
|
|
====={~n}
|
|
|
|
{@select key=pet}
|
|
|
|
{@any}{person} has a pet!{~n}{/any}
|
|
|
|
{@none}I don't know what to name {person}'s pet...{~n}{/none}
|
|
|
|
{@eq value="dog"}Lets name your pet rover{~n}{/eq}
|
|
|
|
{@eq value="lizard"}Lets name your pet dave{~n}{/eq}
|
|
|
|
{/select}
|
|
|
|
|
|
|
|
Is key added to the context?{~n}
|
|
|
|
============================{~n}
|
|
|
|
{@select key=pet}
|
|
|
|
{key}{~n}
|
|
|
|
{@any}{person} has a pet!{~n}{/any}
|
|
|
|
{/select}{~n}
|
|
|
|
|
|
|
|
Conditionals inside loop sections{~n}
|
|
|
|
================================={~n}
|
|
|
|
{@select key=pet}
|
|
|
|
{@any}{person} has a pet!{~n}{/any}
|
|
|
|
{#pet_names}
|
|
|
|
{@eq value=type}Lets name your pet {pet_name}{~n}{/eq}
|
|
|
|
{/pet_names}
|
|
|
|
{@none}I don't know what to name {person}'s pet...{~n}{/none}
|
|
|
|
{/select}{~n}
|
|
|
|
|
|
|
|
Conditionals inside scalar sections{~n}
|
|
|
|
==================================={~n}
|
|
|
|
{@select key=pet}
|
|
|
|
{@any}{person} has a pet!{~n}{/any}
|
|
|
|
{#scalar}
|
|
|
|
{@eq value="cat"}Lets name your pet fluffy{~n}{/eq}
|
|
|
|
{@eq value="dog"}Lets name your pet rover{~n}{/eq}
|
|
|
|
{@eq value="lizard"}Lets name your pet dave{~n}{/eq}
|
|
|
|
{/scalar}
|
|
|
|
{/select}{~n}
|
|
|
|
|
|
|
|
Sections inside select without conditionals{~n}
|
|
|
|
==========================================={~n}
|
|
|
|
{@select key=pet}
|
|
|
|
{@any}{person} has a pet!{~n}{/any}
|
|
|
|
{#pet_names}
|
|
|
|
If your pet was a {type} we'd name it {pet_name}{~n}
|
|
|
|
{/pet_names}
|
|
|
|
{@eq value="cat"}Lets name your pet fluffy{~n}{/eq}
|
|
|
|
{@eq value="dog"}Lets name your pet rover{~n}{/eq}
|
|
|
|
{@eq value="lizard"}Lets name your pet dave{~n}{/eq}
|
|
|
|
{/select}{~n}
|
|
|
|
|
|
|
|
Early termination{~n}
|
|
|
|
================={~n}
|
|
|
|
{@select key=pet}
|
|
|
|
{@eq value="cat"}Lets name your pet fluffy{~n}{/eq}
|
|
|
|
{@eq value="cat"}Lets name your pet whiskers{~n}{/eq}
|
|
|
|
{@eq value="dog"}Lets name your pet rover{~n}{/eq}
|
|
|
|
{@eq value="lizard"}Lets name your pet dave{~n}{/eq}
|
|
|
|
{@any}{person} has a pet!{~n}{/any}
|
|
|
|
text not inside a comparison{~n}
|
|
|
|
{#pet_names}
|
|
|
|
If your pet was a {type} we'd name it {pet_name}{~n}
|
|
|
|
{/pet_names}
|
|
|
|
{/select}{~n}
|
|
|
|
|
2020-06-07 21:06:14 +00:00
|
|
|
Early termination stand-alone comparison{~n}
|
|
|
|
========================================{~n}
|
2020-06-07 20:03:18 +00:00
|
|
|
{@select key=pet}
|
2020-06-07 21:06:14 +00:00
|
|
|
{@eq key="duck" value="duck"}Lets name your pet quackers{~n}{/eq}
|
|
|
|
{@eq value="cat"}Lets name your pet whiskers{~n}{/eq}
|
2020-06-07 20:03:18 +00:00
|
|
|
{@eq value="dog"}Lets name your pet rover{~n}{/eq}
|
|
|
|
{@eq value="lizard"}Lets name your pet dave{~n}{/eq}
|
|
|
|
{@any}{person} has a pet!{~n}{/any}
|
|
|
|
text not inside a comparison{~n}
|
|
|
|
{#pet_names}
|
|
|
|
If your pet was a {type} we'd name it {pet_name}{~n}
|
|
|
|
{/pet_names}
|
|
|
|
{/select}{~n}
|
2020-06-07 22:52:09 +00:00
|
|
|
|
2020-06-13 15:45:45 +00:00
|
|
|
Early termination else block{~n}
|
|
|
|
============================{~n}
|
|
|
|
{@select key=pet}
|
|
|
|
{@eq value="dog"}Lets name your pet rover{~n}{:else}Lets not name your pet rover{~n}{/eq}
|
|
|
|
{@eq value="cat"}Lets name your pet fluffy{~n}{:else}Lets not name your pet fluffy{~n}{/eq}
|
|
|
|
{@eq value="cat"}Lets name your pet whiskers{~n}{:else}Lets not name your pet whiskers{~n}{/eq}
|
|
|
|
{@eq value="lizard"}Lets name your pet dave{~n}{:else}Lets not name your pet dave{~n}{/eq}
|
|
|
|
{@any}{person} has a pet!{~n}{/any}
|
|
|
|
text not inside a comparison{~n}
|
|
|
|
{#pet_names}
|
|
|
|
If your pet was a {type} we'd name it {pet_name}{~n}
|
|
|
|
{/pet_names}
|
|
|
|
{/select}{~n}
|
|
|
|
|
2020-06-07 22:52:09 +00:00
|
|
|
@any alone{~n}
|
|
|
|
=========={~n}
|
|
|
|
{@any}{person} has a pet!{~n}{/any}
|
|
|
|
|
|
|
|
@none alone{~n}
|
|
|
|
==========={~n}
|
|
|
|
{@none}I don't know what to name {person}'s pet...{~n}{/none}
|