Re: [Templates] ANNOUNCE: File-Find-Match 0.05 and ttree/tsite news

[prev] [thread] [next] [Date index for 2004/11/13]

From: Leo Lapworth
Subject: Re: [Templates] ANNOUNCE: File-Find-Match 0.05 and ttree/tsite news
Date: 12:42 on 13 Nov 2004
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
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] ANNOUNCE: File-Find-Match 0.05 and ttree/tsite news
Leo Lapworth 12:42 on 13 Nov 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52