Hi,

I am processing templates with ttree and in one place I generate an index
page from a data file and for each item in the index I want to generate an
additional detail page from a secondary template. Both the index page
and the secondary page are wrapped in a master template. I'm doing
something like this in the index :

[% FOREACH story = news %]
    <a href="/news/[% story.id %].html">[% story.headline %]</a><br>
[% INCLUDE newsitem.tt story=$story.id | redirect("${story.id}.html"); END
%]

This works fine with the exception that the wrapper of the INCLUDEd
template does not obey the META data in the INCLUDEd template, it uses
that of the index page.

For the main pages, I'm using the strategy suggested on list recently of
having a wrapper template called for each page I'm processing. It looks
like this:

[%- UNLESS template.NoWrap; WRAPPER page.tt; PROCESS $template; END;
    ELSE; PROCESS $template; END -%]

For the secondary template, I have to explicitly include [% WRAPPER
page.tt %] at the head of the template.

Can anyone suggest a strategy to get around this problem as I don't want
to create a second master template that works without META directives,
neither do I want to do away with the META directives elsewhere in the
site as they're darned useful !

Many thanks,

Simon.



Reply via email to