title: Passing variables through handlebars partial
body: <p>I'm currently dealing with handlebars.js in an express.js application. To keep things modular, I split all my templates in partials.</p>
  
  <p><strong>My problem</strong>: I couldn't find a way to pass variables through an partial invocation. Let's say I have a partial which looks like this:</p>
  
  <pre><code>&lt;div id=myPartial&gt;
      &lt;h1&gt;Headline&lt;h1&gt;
      &lt;p&gt;Lorem ipsum&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Let's assume I registered this partial with the name 'myPartial'. In another template I can then say something like:</p>
  
  <pre><code>&lt;section&gt;
      {{&gt; myPartial}}
  &lt;/section&gt;
  </code></pre>
  
  <p>This works fine, the partial will be rendered as expected and I'm a happy developer. But what I now need, is a way to pass different variables throught this invocation, to check within a partial for example, if a headline is given or not. Something like:</p>
  
  <pre><code>&lt;div id=myPartial&gt;
      {{#if headline}}
      &lt;h1&gt;{{headline}}&lt;/h1&gt;
      {{/if}}
      &lt;p&gt;Lorem Ipsum&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And the invokation should look something like this:</p>
  
  <pre><code>&lt;section&gt;
      {{&gt; myPartial|'headline':'Headline'}}
  &lt;/section&gt;
  </code></pre>
  
  <p>or so.</p>
  
  <p>I know, that I'm able to define all the data I need, before I render a template. But I need a way to do it like just explained. Is there a possible way?</p>