title: Using variables for a partial template
body: <p>I'm definitely missing something about the way Handlebars works. I need to call different partials depending on the value of a variable. Currently the only way I've found to do it is this:</p>
  
  <pre><code>&lt;template name="base"&gt;
    {{#if a}}{{&gt; a}}{{/if}}
    {{#if b}}{{&gt; b}}{{/if}}
    {{#if c}}{{&gt; c}}{{/if}}
  &lt;/template&gt;
  </code></pre>
  
  <p>And in the corresponding JS:</p>
  
  <pre><code>Template.base.a = function () {
    return (mode === "a");
  }
  
  Template.base.b = function () {
    return (mode === "b");
  }
  
  Template.base.c = function () {
    return (mode === "c");
  }
  </code></pre>
  
  <p>...which strikes me as extremely verbose. What I'd <em>really</em> like to do is something like:</p>
  
  <pre><code>&lt;template name="base"&gt;
    {{&gt; {{mode}} }}
  &lt;/template&gt;
  </code></pre>
  
  <p>In other words, the value of <code>mode</code> would be the name of the partial that is called.</p>
  
  <p>This seems like it must be a very common use-case, but I can't find any examples of this online. Where have I gone wrong?</p>