Re: [Templates] Limiting TT2's features

[prev] [thread] [next] [Date index for 2004/10/05]

From: Chris Winters
Subject: Re: [Templates] Limiting TT2's features
Date: 16:43 on 05 Oct 2004
On Tue, 5 Oct 2004 17:26:22 +0100, Dan Thomas <godders@xxxxx.xxx> wrote:
> I'm using TT2 as a templating system for a (horribly complicated)
> content management system, and I'm trying to lock it down to prevent
> the users from doing silly things.
> Ideally I'd like to be able to disable the INCLUDE directive and
> supply my own alternative (which can be accessible as a passed sub
> rather than a proper directive).
> I've looked at Template::Simple, which is great, but a little too
> basic for my needs (i need the looping and conditional stuff).
> Is there any way I can either disable the include directive or render
> it useless? Or should I start reading about YAPP and making my own
> grammar module?

It would probably be much easier to create your own Template::Provider
subclass and make INCLUDE do your bidding. My brain is fuzzy but I
think someone did this in the last few months on the list -- maybe a
discussion of getting templates out of a database?

Chris

        -- 
        Chris Winters (chris.winters@xxxxx.xxx)
Building enterprise-capable snack solutions since 1988.

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Limiting TT2's features
Dan Thomas 16:26 on 05 Oct 2004

Re: [Templates] Limiting TT2's features
Chris Winters 16:43 on 05 Oct 2004

Re: [Templates] Limiting TT2's features
Darren Chamberlain 16:54 on 05 Oct 2004

Re: [Templates] Limiting TT2's features
Chris Winters 16:57 on 05 Oct 2004

RE: [Templates] Limiting TT2's features
Cahill, Earl 17:47 on 05 Oct 2004

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