[Catalyst] HOWTO reference config settings from template
jchimene at gmail.com
Thu Apr 12 18:01:48 GMT 2007
Peter Karman wrote:
> Jeff Chimene scribbled on 4/12/07 10:35 AM:
>> and I don't see the TT2 configuration settings. When I try the
>> similar experiment in the perl module, & dump __PACKAGE__->config,
>> the TT2 configuration settings are displayed.
> that's because your TT config probably isn't getting set in the master
> config for your app, which is what c.config returns.
> Every M/V/C in Catalyst has a config() method (iirc -- please correct
> me, oh gurus), and the master MyApp class has a config() too, which is
> where you generally set values for the entire application.
> You can set your TT config there too. But looking at what you're
> trying to do, I wonder if what you really want is a TT type config
> file, which can set constants and other relevant TT stuff. CatRose has
> an example of how I do it:
The config is called in the View package (fori::View::Menu) I was hoping
to set TT2 values /per package/ via the config as created by the TT2
helper. It looks like (after DEBUG => 'all') that TT2 only references
the stash when it resolves variables.
I think that I'll look for other ways to solve this problem.
More information about the Catalyst