Sorry, not exactly a Zola question, but I think 99% of the Tera knowledge in the world lives here.
We have a template which I’d like to store some meta-info and be able to get that out (TBC: from the template, not the context).
We’re printing PDFs from HTML using headless-chrome, generated from Tera, and for instance we’d like the template to tell us the page orientation. I can see a hack of rendering it twice, once with a context that tells the template to render just the meta section, but I’m sure I’m missing a proper way. (Tera is great, BTW - )
p.s. I know doing this in CSS is possible- not convinced it’s reliable for printing.
Sorry I’m not sure I fully understand. The template only gets the Context
so what do you want to get out of the template? Some values set by {% set = ... %}
?
Hi, yes, something like that.
We realise it’s “non-standard” - the alternative for us is to embed the info in the template in another way, and then read either the template or the generated HTML file to get the info- not hard to do, but thought it would be nice to do with Tera.
Thanks, Craig