Closed spacedawwwg closed 9 years ago
@shannonmoeller what am I missing test wise? :-)
This looks good. Thanks for meeting the code coverage and style requirements! Couple things:
blockExists
is the right name. Technically, it should be contentExists
.Makes me wonder if it would be better to somehow expose the _layoutActions
value. Perhaps using Handlebars.createFrame
. That way people could bring their own comparison helpers to the party if they so desired:
{{#or @content.main @content.footer}}
<div class="wrapper">
{{#if @content.main}}
<div class="main">
{{#block "main"}}
</div>
{{/if}}
{{#if @content.footer}}
<div class="footer">
{{#block "footer"}}
</div>
{{/if}}
</div>
{{/or}}
Thoughts?
Absolutely. My suggestion/pull was a means-to-an-end for a project I am working on and simply wanted to share what I'd done.
I think what you have proposed above looks a lot nicer!
I've added the {{#if @content.main}}
functionality to the develop branch. Mind kicking the tires?
Coverage decreased (-12.31%) to 87.69% when pulling 00b49aa1a4ef689abcf7e8b63f66aaa56a92b5b8 on spacedawwwg:master into b3d8c5d7018c4bf1d670bf75d494d09d95588bcc on shannonmoeller:master.