I’m trying to alter behavior of a header element based on whether a page is using a custom_template from the dropdown, e.g. where custom_template = 'custom-narrow-side-image'.
There doesn’t seem to be a straightforward way to do this without a lot of hacky workarounds, so I’m assuming I’m missing something.
Is there a preferred way to specify this? e.g. apply classes to the navbar, hide/show content, etc.
I have some color classes I’m trying to apply in a shared navigation bar partial.
I’m able to use #is to toggle modes (e.g. light, dark, dim) based on whether it’s the index page, or content… but there are some content templates (e.g. full-screen stories) that I’d want to override.
Imagine that I want nav-light for home, nav-dark for posts, and nav-dim for posts that use custom-narrow-side-image.
My navigation bar is in a partial.
Ideally, I’d love {{#is}} to accept a template name in addition to a context, so I could
But for now, I’m just looking for any way to furth
// navigation.hbs
// Current sticking point
<nav class="nav {{#is "home"}} nav-light {{else}} nav-dark {{/is}}">
There doesn’t seem to be any body_class or post_class that produces markup that contains custom-narrow-side-image – at least not when it’s loaded via the “global template” (post editor dropdown).