shannonmoeller / handlebars-layouts

Handlebars helpers which implement layout blocks similar to Jinja, Nunjucks (Swig), Pug (Jade), and Twig.
http://npm.im/handlebars-layouts
MIT License
361 stars 29 forks source link

Conditional layout #48

Closed yogevlahyani closed 4 years ago

yogevlahyani commented 4 years ago

I'm trying to achieve conditional layout, is it possible ATM?

{{#if isLightLayout}}
    {{#extend "lightLayout"}}
{{else}}
    {{#extend "darkLayout"}}
{{/if}}
shannonmoeller commented 4 years ago

It's been a while since I've worked on this project. I don't know off the top of my head. Give it a try!

yogevlahyani commented 4 years ago

@shannonmoeller Thanks for the quick response! I think I'll just pass the layout name

shannonmoeller commented 4 years ago

Even better!