Cees Hek wrote:
> On 1/4/06, Michael Peters <[EMAIL PROTECTED]> wrote:
> 
>>I'm trying to use the TT plugin in a new application but I'm not sure if it 
>>will
>>do what I want it to do. I'm using a WRAPPER in my config to give the site the
>>same look without having to alter the individual templates themselves.
>>
>>Now most of the time I want this WRAPPER, but there are occassions when I 
>>don't.
>> What I want to be able to do is pass some sort of flag to turn off this 
>> option.
>>Now, I don't think you can change TT config options on an existing object and
>>the CAP::TT doesn't provide a way to have multiple TT_CONFIG options (or
>>multiple TT objects).
>>
>>Is there a way to accomplish this? Or should I just ditch CAP::TT and handle 
>>the
>>interaction on my own?
> 
> 
> I generally do this by having the wrapper template check for the
> existance of a variable.
> 
> wrapper.tmpl:
> -------------------------
> [% UNLESS skip_wrapper %]
>   header stuff
> [% END %]
> [% content %]
> [% UNLESS skip_wrapper %]
>   footer stuff
> [% END %]

I knew it was easy. And I'm pretty sure I've done something like that before.
Wow, what a mind blank... That's what I get for going on vacation :)

So I just set my 'skip_wrapper' flag in tt_pre_process() and it works just like
I wanted. Thanks.

-- 
Michael Peters
Developer
Plus Three, LP


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to