Re: [Zim-wiki] Export templates

2020-07-07 Thread Johan Vromans
On Tue, 7 Jul 2020 19:54:32 +0200, Jaap Karssenberg wrote: > My guess would be that Your guess? I thought you programmed 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

Re: [Zim-wiki] Export templates

2020-07-07 Thread Johan Vromans
On Tue, 7 Jul 2020 18:57:21 +0200, Jaap Karssenberg wrote: > Yes the template syntax should support the python "get" function. And how is this supposed to work? [% FOR page IN pages %] [% IF page.get("meta") %] yields AssertionError: Not a valid function: page.get TypeError:

Re: [Zim-wiki] Export templates

2020-07-07 Thread Jaap Karssenberg
Yes the template syntax should support the python "get" function. There is a list of supported methods here: https://zim-wiki.org/manual/Help/Templates.html Regards, Jaap Op di 7 jul. 2020 16:50 schreef Johan Vromans : > > Not really, but you could construct a template that is one big "if ...

Re: [Zim-wiki] Export templates

2020-07-07 Thread Johan Vromans
> 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

Re: [Zim-wiki] Export templates

2020-07-07 Thread Johan Vromans
On Tue, 7 Jul 2020 12:18:32 +0200, Jaap Karssenberg wrote: > Not really, but you could construct a template that is one big "if ... > else ..." and includes the two templates. Hmmm. I get TODO also allow files from template resources (both master and develop branch)

Re: [Zim-wiki] Export templates

2020-07-07 Thread Jaap Karssenberg
Not really, but you could construct a template that is one big "if ... else ..." and includes the two templates. Regards, Jaap Op ma 6 jul. 2020 19:53 schreef Johan Vromans : > I'm trying to export a web site from Zim. However, some of the documents > (pages) need a different template. > > Is