title: How to compare the value of a variable in handlebars
body: <p>I want to display the <code>active</code> class if the title variable matches the name.
  This is how I convey the meaning.</p>
  
  <pre><code>&lt;head&gt;
      &lt;title&gt;{{title}}&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      {{&gt; header content=title}}
  
      {{{body}}}
  
      {{&gt; footer}}
  &lt;/body&gt;
  </code></pre>
  
  <p>In the menu, if title is equal to a variable, display the class active</p>
  
  <pre><code>&lt;nav&gt;
      &lt;div&gt;
          &lt;a {{#if title == 'Portfolio'}} class="active" {{/if}} href="/portfolio"&gt;Наши проеткы&lt;/a&gt;
          &lt;a {{#if title == 'Blog'}} class="active" {{/if}} href="/blog"&gt;Полезно почитать&lt;/a&gt;
          &lt;a {{#if title == 'Contact'}} class="active" {{/if}} href="/contact"&gt;Связаться&lt;/a&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;a {{#if title == 'Ru'}} class="active" {{/if}} href="/ru"&gt;RU&lt;/a&gt;
          &lt;a {{#if title == 'Eng'}} class="active" {{/if}} href="/eng"&gt;ENG&lt;/a&gt;
      &lt;/div&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>How to compare the value of a variable in handlebars?</p>