← Back to team overview

zim-wiki team mailing list archive

Re: Export templates

 

On Tue, Jul 7, 2020 at 7:59 PM Johan Vromans <jvromans@xxxxxxxxxxx> wrote:

> On Tue, 7 Jul 2020 19:54:32 +0200, Jaap Karssenberg
> <jaap.karssenberg@xxxxxxxxx> wrote:
>
> > My guess would be that
>
> Your guess? I thought you programmed it :)
>

Sure - if only everything behaved as I intended it when I wrote it :/



> >
> >    [% IF page.meta.get("Templat") %]
> >
> > is what you are looking for. The "meta" attribute is a dict, not "page".
>
> This yields: AssertionError: Not a valid function: page.meta.get .
>
> Besides, the reference to page.meta already gives warnings if there's no
> metadata (as is the case for most of my pages).
>

Have to look into this - quick glance at the code suggests "meta" always
exists and gets initialized as an empty dict even when no content. So
something goes wrong in wrapping it for access from the template.

-- Jaap

Follow ups

References