Support multiple content blocks using Nunjucks while honoring the data cascade #4119
euro
started this conversation in
Enhancement Queue
Replies: 5 comments
|
Related in Liquid: https://liquidjs.com/tags/layout.html#Multiple-Blocks Gray matter sections seems similar too: #2502 |
0 replies
|
I'm missing this feature too - really would like to use this feature. |
0 replies
|
I have a solution for this. I'll try to build a quick sample and link it up. Link up this in eleventy.config: uses this in the data file: and this in the template:
|
0 replies
|
@euro beware, nested bundles are not supported! |
0 replies
|
Link to the Nunjucks docs: https://mozilla.github.io/nunjucks/templating.html#template-inheritance which also has a shout to https://jinja.palletsprojects.com/en/stable/templates/#template-inheritance What exactly about the data cascade is missing here? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
The njk system supports extends and blocks but this seems to break Eleventy’s data cascade.
Describe the solution you'd like
I would like to see support for multiple named content blocks that can be implemented in templates and identified in the content files.
Describe alternatives you've considered
No response
Additional context
No response
All reactions