Closed Florian-R closed 8 years ago
When you want to include a partial that itself extends a layout, you can't use the {{> partial}}
syntax. You use {{#embed 'partial'}}{{/embed}}
or {{{embed 'partial'}}}
instead. If you change the container template in the <body>
of your demo to the following, it works as expected:
<script type="text/template" id="container">
{{#extend 'otherBase'}}
{{#content 'otherBaseContent'}}
{{{embed 'firstDescendant'}}}
{{{embed 'secondDescendant'}}}
{{/content}}
{{/extend}}
</script>
https://github.com/shannonmoeller/handlebars-layouts#embed-partial-context-keyvalue-
Ah my bad, I knew about embed, but always use it instead of extend, not when calling directly the partial.
/me being dumb, closing this
No worries. Not dumb. Maybe this thread will help someone else too.
Sorry for the weird title, but this is a tricky one and couldn't really find a good name for this issue.
See this requirebin for more context.
I'm not sure I'm not doing something totally wrong here, so let me know if I miss something and I'll try to fill a PR if it's totally valid scenario.