title: How to use if or ternary operator in underscore template
body: <pre><code>&lt;script type=&quot;text/template&quot; id=&quot;list-template&quot;&gt;
      &lt;td class=&quot;title&quot;&gt;&lt;span&gt;&lt;%-from['name'] %&gt;&lt;/span&gt;&lt;/td&gt;
      &lt;td&gt;
      &lt;div class=&quot;title&quot;&gt;&lt;span&gt;&lt;%- message ? message : '' %&gt;&lt;/span&gt;
  
      &lt;/td&gt;
      
      &lt;td&gt;&lt;span&gt;&lt;%-id %&gt; &lt;/td&gt;
                               
  &lt;/script&gt;
  </code></pre>
  <p>Error is:</p>
  <blockquote>
  <p>ReferenceError: message is not defined</p>
  <p><code>((__t=( message ? message : '' ))==null?'':_.escape(__t))+</code></p>
  </blockquote>