On Fri, Nov 12, 2004 at 10:23:45PM -0500, Dylan Hardison wrote:
> Anyway, if you, my fellow perl mongrels, could reply with things that
> you've wanted ttree to do, but were so afraid of its code you decided
> not to, It'd be very helpful to me.

There may be a way to do this in ttree, if so I haven't found it easily.

On most files I want to use a pre-process (e.g. have a header
file included for all pages). This issue is that when I run ttree
it passes ALL files, I want to specify directories / pattern matches
where they aren't included.

I guess one could go as far as:

%pre = (
        # Match         => file
        'default'       => 'include/header.txt',
        '*includes*'    => undef,
        '*templatedir*' => undef,
        '*/special*'    => 'specific/header.txt',
        '*.tt'          => 'other/header.txt',
);

at the moment, all my include and template files are also getting the header.txt
added (which acutally contains a load of apache SSI stuff, rather
than html so it doesn't break but the user gets served this from mod_perl
passed templates and apache obviosuly has to process all the extra data in
the static pages which have includes.

Not sure how one would handle several matches, e.g. /templatedir/file.tt
matching two results. Either some sort of presidence given to each, or an
option to have several headers applied.

Anyway, you get the jist.

Cheers

Leo

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to