Nested helpers are definitely possible within Dust.js
, as long as the nested helper is in the body of the outer helper (as opposed to being within the parameters). The @select
helper is an example of nested helpers already in wide use.
{@select key=myKey}
{@eq value="Yes"}YES{/eq}
{@eq value="No"}NO{/eq}
{@default}Neither here nor there{/default}
{/select}