Question

How do I check for if not condition in the Dust.js templates?

{?tags}
{:else}
  <p>Sorry, There are no tags!</p>
{/tags}
Was it helpful?

Solution

This is built into Dust, using the ^ tag (often called the "not" tag):

{^tags}
  <p>Sorry, There are no tags!</p>
{/tags}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top