Dustjs OR helper

83 views Asked by At

How to write below statement using dust helper?

{@eq key="device" value="windows || Linux"}
     Your system is Windows or Linux based.
{:else}
     Your system is MAC based.
{/eq}
1

There are 1 answers

0
smfoote On BEST ANSWER

You can use the @any helper with the Select Helper to achieve this:

{@select key=device}
  {@eq value="windows"/}
  {@eq value="Linux"/}
  {@any}Your system is Windows or Linux based.{/any}
  {@none}Your system is MAC based.{/none}
{/select}