Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yield regions do not work if no main region is yielded #14

Open
paulbalomiri opened this issue Nov 17, 2014 · 2 comments
Open

yield regions do not work if no main region is yielded #14

paulbalomiri opened this issue Nov 17, 2014 · 2 comments

Comments

@paulbalomiri
Copy link

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.
  • 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
Copy link
Author

Bump: Could you acknowledge this, or tell me if the report is unclear/mistaken

@paulbalomiri
Copy link
Author

does someone still maintain this package ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant