I didn't get any replies for my first go-around on this question, so I'll rephrase and cross my fingers...
 
I'm using ttree and mostly built-in tt2 directives, filters, and plugins (i.e. not much raw perl code) to build a large static website.  I'm trying to figure out how to access the full path to the current template being processed so I can automatically set some context based on how the template files are organized into subdirectories, i.e. rather than having to do this in each and every template:
 
[% WRAPPER page section = "foo" %]
...
 
I'd like to add something like the following in the main template itself:
 
[% DEFAULT section = ??? %]
 
or if it requires some raw perl:
 
[% PERL %]
$stash->set(section => ???);
[% END %]
 
Where the '???' is some regular _expression_ that gets the path to the current template.  Is this info available somewhere, perhaps through the $context variable?
 
Thanks!!
 
Dustin
 

Reply via email to