Hi there. I am having a problem with the META directive which does not seem to work if it is embedded in a template file called from [% PROCESS filename %] or [% INCLUDE filename %]. For example:

index.pl:
--------

$tt->process('main.html.tmpl', $vars)
   || die $tt->error();

main.html.tmpl:
--------------

[%
   IF session.logged_in;
       tmpl_file = q.param('page') or 'index';
   ELSE;
       tmpl_file = 'login';
       CALL q.param( 'page', 'login' );
   END
%]

[% PROCESS "${tmpl_file}.html.tmpl" %]

login.html.tmpl:
---------------

[% META title = 'Login Page'
       about = 'Description about the login page'
%]

...

However, this does NOT appear on my login.html page, e.g. '<title></title>' and that's it.

If I move the META stuff from 'login.html.tmpl' and put it in 'main.html.tmpl' it works just fine. If I change PROCESS to INCLUDE this does not help either.

Any ideas on the best way to fix this?

Thanks alot in advance.

--
Kiffin Gish
Development Team, Demon (THUS plc)

Postbus 15829
1001 NH Amsterdam
The Netherlands

T: +31 (0)20-422 20 00
F: +31 (0)20-422 20 01
M: +31 (0)6-21 83 68 28
http://www.demon.nl


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

Reply via email to