Forums/Community/Zendesk Apps

Handlebar values and conditions allowed within parent layout.hdbs template?

Jeff Tanner
posted this on September 06, 2012 13:00


The app.js provides switching between page templates and loads values and conditionals that can be used within that template, but they are not available to the parent layout template "layout.hdbs".

For example, I tried adding to "layout.hdbs" the following Handlebar conditional {{#if}} within <header> and this app failed to present within Lotus Beta.

  <span class="logo"/>
  <h3>{{t ""}} {{t "app.version"}}</h3>
  {{#if !app_is_production_mode}}
    <i>{{t "app.testMode"}}</i>


Jeff in Seattle



User photo
James Rosen

Handlebars doesn't support logic inside {{#if }} statements. You want the {{#unless }} helper.

September 06, 2012 13:30