zim-wiki team mailing list archive
Mailing list archive
Re: Export templates
Yes the template syntax should support the python "get" function. There is
a list of supported methods here:
Op di 7 jul. 2020 16:50 schreef Johan Vromans <jvromans@xxxxxxxxxxx>:
> > Not really, but you could construct a template that is one big "if ...
> > else ..." and includes the two templates.
> To select the appropriate template I'd like to use a meta setting,
> something similar to:
> Content-Type: text/x-zim-wiki
> Wiki-Format: zim 0.4
> Template: foo
> And in the template:
> [% IF page.meta.Template == "Foo" %] ... [% END %]
> Technically this works, but generates an awful amount of warnings.
> I couldn't find a way to test whether a page has a meta, and whether this
> meta has the key.
> Did I miss a hidden equivalent to the python 'key in dict' test?
> Mailing list: https://launchpad.net/~zim-wiki
> Post to : zim-wiki@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help : https://help.launchpad.net/ListHelp