duster/js/test_cases/explicit_context_setting/main.dust

14 lines
462 B
Plaintext
Raw Normal View History

{! First we do it without explicit context setting which results in being able to read some_global but not pet !}
{#loop}
{#person}
{$idx}: {name} has a pet {pet} but not a {some_global}{~n}
{/person}
{/loop}
{! Then we do it with explicit context setting which should result in being able ot read pet but not some_global !}
{#loop}
{#person:explicit}
{$idx}: {name} has a pet {pet} but not a {some_global}{~n}
{/person}
{/loop}