[Templates] Some issues while trying to include templates inside templates

Benoit Amiaux b.amiaux@ateme.fr
Tue, 14 Nov 2006 11:34:50 +0100


Hello,

While using template toolkit to generate dynamic web pages I've noticed=20
I'm unable to include templates inside other templates.
This is my current setup:

apachedir: d:/apache2

cgidir: $apachedir/cgi-bin
I have one cgi script, called web.pl here. Apache2 is configured to call=20
web.pl on any ttml file accessed through the browser.

webroot: $apachedir/htdocs
I have one template html file here, index.ttml

index.ttml tries to include system.ttml ([% INCLUDE system.ttml %]). It=20
doesn't matter whether I put system.ttml inside $webroot or $cgidir. In=20
both cases, template toolkit is unable to find this file. I tried to=20
modify INCLUDE_PATH while initializing the template object, but without=20
success. As default behaviour is to include at least current directory,=20
I assumed either $cgidir or $webroot would have been included but it=20
seems not.
It can be an issue with win32 directory names ('d:/') as the ':'=20
character would clash with INCLUDE_PATH grammar which consider it as a=20
separator.
Anyway, any help or pointers to fix this particular issue would be great.

Thanks,
AMIAUX Beno=EEt