Am Sat, 30 Aug 2008 01:20:19 +0200
schrieb Michael Franzl <m.franzl at aon.at>:
> I was in the process of trying to understand how template chains work
> and worked through the example given in the online help of
> Webgen::ContentProcessor::Blocks via a newly created wegben-0.5.3
> project.
> (http://webgen.rubyforge.org/documentation/contentprocessor/blocks.html)
> I copy-pasted the code exactly as given on your site.
>
>
> Webgen stops with:
>
> > An error has occurred: Error while processing
</index.en.html>:
> Error rendering </index.en.html>: no block named
''content'' in
> </default.template>
>
>
> Removing the first line of default.template
>
> > --- name:content, pipeline:blocks
>
>
> webgen stops with:
>
> > Log messages:
> > ERROR -- Could not resolve <my.page> in
</default.template> in
> ''<webgen:block name=''content''
chain=''page.template;my.page'' />''
> > ERROR -- Could not resolve <my.page> in
</default.template> in
> ''<webgen:block name=''content''
chain=''page.template;my.page'' />''
>
>
> Using ''relocatable'' for my.page also didn''t
help:
>
> > Writing changed nodes...
> > An error has occurred: Error while processing
</index.en.html>:
> Node </page.template> has no block named ''content''
>
> Webgen works great for me so far, but I want to take advantage of
> template chains. Can you help?
Hi Mark,
there are two errors in my example: you need to remove the comma in the
block start lines of default.template and page.template so that it says:
--- name:content pipeline:blocks
|
\_ No comma here!
And you need to use
<webgen:block name=''content''
chain=''page.template;my.html'' />
|
Since this needs to be an (L)CN, we need .html _/
I have corrected this in the sources and uploaded the fixed
documentation page for blocks. Thanks for bringing this to my attention!
-- Thomas