2
votes

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

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

1 Answers

8
votes

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

{^tags}
  <p>Sorry, There are no tags!</p>
{/tags}