[Templates] wrapper in control?
Randal L. Schwartz
merlyn@stonehenge.com
28 Aug 2000 07:18:57 -0700
>>>>> "Andy" == Andy Wardley <abw@cre.canon.co.uk> writes:
Andy> When I added the PRE_PROCESS and POST_PROCESS options, I thought about
Andy> also adding the PROCESS option. At the time, I was only considering adding
Andy> it for completeness, but I couldn't think of a good use for it, so didn't
Andy> bother. However, this sounds like exactly what you need.
Andy> If you specify a PROCESS template (or templates) then it gets processed
Andy> instead of your main template. The original template is still available
Andy> as the 'template' reference so you can examine metadata items and INCLUDE
Andy> or PROCESS it if you want.
This worked Great! Thank you!
Next question:
I know I can put a filter into some area that a filter provider can
see, but is there any way to mock up a filter definition using
[%PERL%] within the same template? I tried to work my way through
both the docs and the code, but it seems like I'm swimming upstream.
I know, Mason spoiled me, making it far to easy to put some little
Perlish hack in the middle of a text file. And the "right thing" is
to put it out into a module that can be shared. But can I just stuff
$context->stash() with some coderef somehow?
Thanks... I'm much closer today than I was last week to moving
stonehenge.com to TT2.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!