title: Embedding Partials as data in Mustache
body: <p>I'm running into a problem with mustache templating and I hope someone can help. Specifically, if I embed a partial as a data item within my template, Mustache doesn't completely parse my template. <strong>How do I get Mustache to completely parse all of the template, including partials as data?</strong></p>
  
  <pre><code>&lt;?php
  $m = new Mustache;
  
  $template = '
      {{header}}
      {{body}}
      {{footer}}
  ';
  
  $data = array(
      'header' =&gt; 'header', 
      'body' =&gt; '{{&gt; embedded}}', 
      'footer' =&gt; 'footer'
  );
  
  $partials = array(
      'embedded' =&gt; 'embedded'
  );
  
  die($m-&gt;render($template, $data, $partials));
  ?&gt;
  </code></pre>
  
  <p>What I expect to see is:</p>
  
  <pre><code>header embedded footer
  </code></pre>
  
  <p>but what actually happens is</p>
  
  <pre><code>header {{&gt; embedded}} footer
  </code></pre>
  
  <p>If I put <code>{{&gt; embedded}}</code> directly into the template it works, however for one reason or another, I can't hardcode that value right now. I also can't use a php specific solution as the template needs to function equally well on client side with javascript.</p>