Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: CGI::Application, Template Toolkit and global parameters

by szbalint (Friar)
on Nov 06, 2005 at 11:44 UTC ( #506100=note: print w/replies, xml ) Need Help??


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?
  • Comment on Re: CGI::Application, Template Toolkit and global parameters

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

    If you want to use it in a constant-like form though, why not just merge menu.def.tmpl and main_menu.tmpl together?

    I guess that is one of those obvious solution you can only react to with "why didn't I think of that sooner?". Thanks for the suggestion.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://506100]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2018-05-26 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?