> > After one and half document reading and web search I can't figure
> > out how to include all files from a directory relative to the
> > main template.
> 
> This may help you find the current directory for the current template
> that you are in:
> 
>    
> http://mail.template-toolkit.org/pipermail/templates/2007-December/009881.html

Dear Larry,

Thanks for your answer.

Unfortunately template.name gives a path not absolute
but relative to the one of members of INCLUDE_PATH.

Meanwhile the [% USE dir = Directory(...) %] construction
works as usual open() system call. It requires absolute
path or relative to the current working directory.

The problems are:
- CWD may vary and there is no way to figure out runtime.
- No way to determine what are members of INCLUDE_PATH
  and which one contains the root template.

At least according to my knowledge. :-)
(Of course adding PERL code can solve anything. I wonder
is there any way to avoid this.)

Gabor
-- 
E-mail = m-mail * c-mail ^ 2

_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to