title: php mustache conditional value like handlebars block helpers
body: <p>In Handlebars, you can make conditionals, like:</p>
  
  <pre><code>{{#if isActive}}
    &lt;img src="star.gif" alt="Active"&gt;
  {{/if}}
  </code></pre>
  
  <p><a href="http://handlebarsjs.com/block_helpers.html" rel="nofollow">http://handlebarsjs.com/block_helpers.html</a></p>
  
  <p>I've been trying for a while to do something like this in the PHP Mustache. But nowhere i can find anything allowing {{#something withvalue }}</p>
  
  <p>Why not just use the {{#each }} to <code>if</code> something? If I want to Each over a list making <code>li</code>s, and I only want to wrap them in a <code>ul</code> when there are actually <code>li</code>s?</p>
  
  <p>I would need an extra value that has prechecked the list, which I think is ugly.</p>
  
  <pre><code>{{#hasList }}
  &lt;ul&gt;
  {{# list }}
      &lt;li&gt;{{ title }}&lt;/li&gt;
  {{/ list }}
  &lt;/ul&gt;
  {{/hasList }}
  </code></pre>
  
  <p>There must be a way to handle this in Mustache, right?</p>