You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @olegolo .
Unfortunately resources of supporters are limited and we're not capable of handling all the issues simultaneously. The main priority for now is 2.0 release.
If this is critical functionality for you I'd kindly ask to help with the investigation and fixing.
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.
Had a quick look at the issue.
The problem is related to the order we execute *inline. *inline has decorator behaviour and should be executed as the first statement on the block. Unfortunately right now it's not handled in this way.
Activity
olegolo commentedon Oct 22, 2020
Any progress on this?
oformaniuk commentedon Nov 2, 2020
Hello @olegolo .
Unfortunately resources of supporters are limited and we're not capable of handling all the issues simultaneously. The main priority for now is 2.0 release.
If this is critical functionality for you I'd kindly ask to help with the investigation and fixing.
olegolo commentedon Nov 2, 2020
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.
oformaniuk commentedon Nov 2, 2020
Possibly related issue: /issues/300
oformaniuk commentedon Nov 2, 2020
Had a quick look at the issue.
The problem is related to the order we execute
*inline.*inlinehas decorator behaviour and should be executed as the first statement on the block. Unfortunately right now it's not handled in this way.