> I am just starting to use TT2 and have read the documentation many times. 
> I was wondering if anyone has an idea on this.  Is it possible to run ttree
> or perl script with only one template and generate multiple destination
> (HTML) files? Or even write a customized perl wrapper script. I think this
> would be a very powerful feature, but not sure how this can be implemented.
> Please post any ideas. 
> thanks. rob

You could do this in perl (loop over the pages and call process on
each one) or in TT itself.  One way to do it in TT is to use the
redirect filter, for example something like:

    [% FOREACH city = cities.keys -%]
        [% FILTER redirect("${city}.html"); %]
            [% INCLUDE header title = "$city Page" %]
            <a href="[% city.url %]">[% city.office</a>
            [% INCLUDE footer %]
        [% END %]
    [% END -%]

You will need to set the OUTPUT_PATH config variable.
See Template::Manual::Filters.

Craig


Reply via email to