in reply to CGI::Application, Template Toolkit and global parameters
Since you process the main_menu.tmpl, it acts like it is defined in the Template toolkit Manual.
Basically if you 'PROCESS' a template, it can modify the current variable stash, it does not use localization. So it sees and can modify all the variables you "have"(can use) in layout.tmpl in your first example (you pass the variables when you call $self->tt_process() for example in your perl code).
If you want to use it in a constant-like form though, why not just merge menu.def.tmpl and main_menu.tmpl together?
Basically if you 'PROCESS' a template, it can modify the current variable stash, it does not use localization. So it sees and can modify all the variables you "have"(can use) in layout.tmpl in your first example (you pass the variables when you call $self->tt_process() for example in your perl code).
If you want to use it in a constant-like form though, why not just merge menu.def.tmpl and main_menu.tmpl together?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: CGI::Application, Template Toolkit and global parameters
by Fang (Pilgrim) on Nov 06, 2005 at 11:55 UTC |
In Section
Seekers of Perl Wisdom