tera
tera copied to clipboard
Jinja `call` block
Hi,
Does Tera have a syntax equivalent to Jinja's call? If not, it would be interesting to see this feature appear in Tera ! (Especially for the first example with render_dialog
).
https://jinja.palletsprojects.com/en/2.10.x/templates/#call
Thanks,
It doesn't have anything like that. I'm not planning to implement it myself since the usage is pretty narrow so it would have to come from a contributor
Well, maybe I will give it a try. I understood the first example of the documentation, which seems to me the most interesting: that of having the possibility to render a child into the macro.
@HelloEdit if you are still interested in that I would take a PR for it
I'd be interested in that feature too.
I'm coming from Zola. There is a slight divergence between shortcodes
(that can only be called in the Markdown) and macros
that are somehow similar, but cannot accept a block.
Maybe it's time to learn Rust too ;)