handlebars: Passing variable to partial inside each
<p>I create a list with the block helper <code>#each</code>, but I can't pass variables to my partial inside my each loop.</p>

<pre><code>{{#each a-z.letters}}
    {{this}} /*[1]*/
    &lt;li class="list-inline__item"&gt;
        {{&gt;button btn="btn-text" addClass='-large' link='letter/{{this}}' label='{{this}}'/*[2]*/}}
    &lt;/li&gt;
{{/each}}
</code></pre>

<p>The link partial:</p>

<pre><code>&lt;a href="{{link}}" class="btn-text {{addClass}}"&gt;{{label}}&lt;/a&gt;
</code></pre>

<p>The output is:</p>

<pre><code>&lt;ul class="list-inline"&gt;
    A /*[1]*/
    &lt;li class="list-inline__item"&gt;
        &lt;a href="letter/{{this}}/*[2]*/" class="btn-text -large"&gt;{{this}}/*[2]*/&lt;/a&gt;
    &lt;/li&gt;
    ....
</code></pre>

<p>[1] Just for testing and it works</p>

<p>[2] If i want to pass it inside a partial it doesn't render my params</p>

<p><strong>UPDATE</strong></p>

<p>So this is my helper now to extend my href with an url.</p>

<pre><code>Handlebars.registerHelper('updateLink', function(options){
    var insertAt = "href=";
    var content = options.fn(this).trim();
    var pos = content.indexOf(insertAt) + insertAt.length+1;  // +1 for the quotation marks
    content  = content.slice(0, pos) + options.hash.url + content.slice(pos, content.length);
    return new Handlebars.SafeString(content ); 
});
</code></pre>

<p>The link partial:</p>

<pre><code>{{#updateLink url="letters/"}}
    {{&gt;button link=this label=this btn="btn-text" addClass='-large'}} 
{{/updateLink}}
</code></pre>