<delurking />

On Thu, Feb 12, 2009 at 04:04:39PM -0500, Perrin Harkins wrote:
> I do something similar in TT by varying the include path.  I have
> default files in a base directory and overrides in directories under
> that.  Then I set the include path on each request to be an
> inheritance tree for the templates: [ '/tt', '/tt/cats' ].  Then when
> I call "PROCESS head.html" from inside my main template it will look
> first in /tt/cats and then fall back to /tt.  This works great for
> customizing a nav bar for a certain part of the site, etc.


        Funnily enough, I think I was trying to do roughly the same
thing and -- being new to TT -- was going to ask the list if there's
an already established way of doing it.  As ttree didn't seem to
support that kind of overloading out-of-the-box, I've ended up
hacking its guts a wee bit to implement the desired behavior
(if anyone's interested, I can share my fork on Github).  But I'm
curious, has anyone came up with a more elegant to support that kind of 
dynamic per-document INCLUDE_PATH munging?


Joy,
`/anick
-- 

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to