Am Sun, 24 Aug 2008 00:14:02 +0200
schrieb Michael Franzl <m.franzl at aon.at>:
> Now I worked around this by using <webgen:block name="quote"
/> in
> the template and including the external file via a
''quote''-block:
>
> --- name:quote
> {include_file: {filename: src/quote.page, process_output: true}}
>
> The downside of this workaround is that I have to use this block in
> every page file.
>
> Would it make sense to enable content processing for the
> ''include_file''-tag directly in the template?
No content processing is done for the tag include_file! What I said
before relies solely on the execution order of content processors of a
page file: The default pipeline is erb,tags,maruku,blocks which means
that tags are processed before the content is converted to HTML by
maruku. Therefore, when a tag creates output, its output is formatted
by maruku and thus you can include a maruku file which gets correctly
formatted.
Since template and page files can have more than one block, just add
a block like this to the template:
--- name:quote pipeline:tags,maruku
{include_file: src/quote.page}
and add the following to the place in your template where the quote
should go:
<webgen:blocks name="quote" chain="default.template"
/>
-- Thomas