Re: [Templates] Limiting TT2's features
[prev]
[thread]
[next]
[Date index for 2004/10/05]
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
 |
 |
Re: [Templates] Limiting TT2's features
Chris Winters 16:43 on 05 Oct 2004
|