[Templates] Re: Restricting access when RELATIVE is on
Josh Rosenbaum
josh@infogears.com
Sun, 14 Jan 2007 01:11:30 -0700
Mihai Bazon wrote:
> Nevermind... looks like RELATIVE doesn't do what I need anyway. :-(
>
> I have this:
>
> INCLUDE_PATH => '/foo'
>
> /foo/bar/index.tt
> /foo/bar/baz/other.tt
>
> And in index.tt I want to be able to say:
>
> [% PROCESS baz/other.tt %]
>
> that is, provide a path relative to the directory of the current template.
>
> Now, RELATIVE seems to allow paths relative to the CWD at the time the
> Template object was created (which in my case is "/").
[SNIP]
You don't need RELATIVE to do this. This should work by just doing:
[% PROCESS bar/baz/other.tt %]
Or you can add /foo/bar/ to your INCLUDE_PATH to do your baz/other.tt method. Each path there is checked for your specified template.
-- Josh