-
Notifications
You must be signed in to change notification settings - Fork 235
Description
Problem statement:
Having a layout
Handlebars.RegisterTemplate("layout", @"Hello {{>sec1}}" and {{>sec2}}");
and a template
{{#*inline 'sec1'}} Tom {{/inline}} {{#*inline 'sec2'}} Jerry {{/inline}}
Expected result: Hello Tom and Jerry
Actual result: Hello and Jerry
After some experiments, I found out that the first section is always used for the 'everything else' like the texts outside of sections.
Workaround#1 inverse dependencies and register template as partial
Workaround#2 having a layout with the first Default section
{{#*inline 'garbage'}} this is going to fall into hidden div for example {{/inline}} {{#*inline 'sec1'}} Tom {{/inline}} {{#*inline 'sec2'}} Jerry {{/inline}}
Suggestion
Add the ability to completely disable garbage content and omit the first (mandatory to make it work) section.