[Templates] Changeing the INCLUDE_PATH
Perrin Harkins
pharkins@etoys.com
Tue, 15 Aug 2000 11:09:48 -0700 (PDT)
On Tue, 15 Aug 2000, Jonas Liljegren wrote:
> I remember that we talked about this. How do I change the INCLUDE_PATH of
> an existing template object?
The method for that is in the Template::Provider class. You can reach it
like this:
$tt->service->context->load_templates->[0]->include_path($include_path)
If you have multiple providers, that [0] will need to be something
fancier.
There's also the encapsulation-be-damned method:
$tt->{'SERVICE'}->{'CONTEXT'}->{'LOAD_TEMPLATES'}->[0]->{'INCLUDE_PATH'}
= $include_path;
Credit goes to Craig McLane for figuring this out.
- Perrin