title: How to pass a string as an argument in Handlebars helper expression?
body: <p>I am trying to create my own Handlebars helper, but am having problems passing it arguments. For context, I'm trying to hack Ghost (<a href="http://tryghost.org" rel="nofollow">http://tryghost.org</a>), but I suspect this is a more general Handlebars problem.</p>
  
  <h2>Working</h2>
  
  <p>First, a working example. Here is the relevant part of my template:</p>
  
  <pre><code>&lt;h1&gt;{{myHelper}}&lt;/h1&gt;
  </code></pre>
  
  <p>Here is my <code>Handlebars.registerHelper</code> method (Ghost renames it but it's the same):</p>
  
  <pre><code>ghost.registerThemeHelper("myHelper", function() { 
      console.log(this.posts[0].title); // outputs "Welcome to Ghost" to console
      return this.posts[0].title; // returns "Welcome to Ghost"
  })
  </code></pre>
  
  <h2>Not Working</h2>
  
  <p>Below is what I want to achieve. The template: </p>
  
  <pre><code>&lt;h1&gt;{{myHelper "title"}}&lt;/h1&gt; 
  &lt;h3&gt;{{myHelper "slug"}}&lt;/h3&gt;
  </code></pre>
  
  <p>When I try to pass arguments to the method it fails to substitute the variable:</p>
  
  <pre><code>ghost.registerThemeHelper("myHelper", function(myData) { 
      console.log(this.posts[0].myData); // outputs "undefined" to console
      return this.posts[0].myData; // returns nothing
  })
  </code></pre>
  
  <p>What is the proper means of passing a string like "title" in order for it to be evaluated in an expression?</p>
  
  <p>For any curious Ghost users, I registered my own helper within the <code>activateTheme()</code> function in <code>ghost/core/server.js</code></p>