Skip to content

Feature: @partial-block for nunjucks engine #1105

@thommyhh

Description

@thommyhh

What problem would this feature solve?

The handlebars engine supports partial-blocks, making it possible to create wrapper components or override a component's content from parent/including template. I could not find a way to achieve the same result when using nunjucks as template engine.

What the feature should look like?

A nice way would be a partial tag, that renders the content between {% partial '@container-partial' %} and {% endpartial %} and make the result usable as variable or function in the container-partial. This would be similar to nunjucks {% call 'someMacro' %}...{% endcall %} tag using {{ caller() }} inside the macro to render/output the tag body.

I'm not familiar with the internals of either fractal or nunjucks, so I'm not able to create that myself. Therefore I hope, someone has the knowledge and the time to do that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions