> Message: 1
> Date: Thu, 14 Jun 2001 22:02:30 +0400
> From: Konstantin Tokar <[EMAIL PROTECTED]>
> Reply-To: Konstantin Tokar <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [Templates] How to ?
>
> Let
> INCLUDE_PATH => [ '/tmpl1', '/tmpl2']
>
> in index.html:
> ...
> [% INCLUDE menu.tmpl %]
>
> [% IF menu.tmpl from '/tmpl1' %]
> do one,
> [% ELSIF menu.tmpl from '/tmpl2' %]
> do two
> [% END %]
> ...
>
> How to determine, from what directory the file menu.tmpl -
> from '/tmpl1 ' or from '/tmpl2 ' was included?
>
Why don't you handle this in the menu.tmpl file? each one would set a unique signature 'from'; you'd want to use Process instead of include i think to see the changed value of 'from' in the parent
[% PROCESS menu.tmpl %]
[% SET from = '/tmp1/menu.tmpl' %]
and test the value of menufrom
[% IF from == '/tmp1/menu.tmpl' %]
