yield regions do not work if no main region is yielded
Opened this issue · 2 comments
paulbalomiri commented
I woked out this simple case for showcasing the problem
template(name='dynamic_template')
h4 region1
+yield 'region1'
h4 main
// without the main yield no region is rendered at all
+yield
h4 region2
+yield 'region2'
template(name='dynamic_template_caller')
+Layout template='dynamic_template' data=something
|main
+contentFor 'region1'
|content of region 1
+contentFor 'region2'}}
|content of region 2
- without the main yield (
+yield
) neither+yield 'region1'
nor+yield 'region1'
are rendered- Any call to
hasRegion 'region1'
helper returns false in this case.
- Any call to
- putting
+yield
back in renders all three correctly.
Should dynamic templates with only named regions (=without a main region) be supported ?
EDIT : rephrasing made clear in which case hasregion is not supported
paulbalomiri commented
Bump: Could you acknowledge this, or tell me if the report is unclear/mistaken
paulbalomiri commented
does someone still maintain this package ?