Damian Nadales wrote:
> In order to create the navigation bar, I need for each file to get the 
> directory where that file is located. Is there a way of doing this using the 
> template toolkit (I mean, without writing any perl code:) )?

Hi Damian,

The 'template.name' variable holds the path to the main page template
(relative to the INCLUDE_PATH).

So to get the directory you can do something like this:

    [% dir = template.name.remove('/[^/]*$') %]

For example, if template.name is 'path/to/template.html' then you'll
end up with dir set to 'path/to'.

HTH
A


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

Reply via email to