tera icon indicating copy to clipboard operation
tera copied to clipboard

Jinja `call` block

Open poupryc opened this issue 5 years ago • 4 comments

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,

poupryc avatar Aug 02 '19 15:08 poupryc

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

Keats avatar Aug 04 '19 18:08 Keats

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.

poupryc avatar Aug 04 '19 19:08 poupryc

@HelloEdit if you are still interested in that I would take a PR for it

Keats avatar May 26 '20 19:05 Keats

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 ;)

zaiste avatar Jun 02 '20 15:06 zaiste