On Apr 12, 2007, at 1:01 PM, Jeff Chimene wrote:


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.

What is the problem you are trying to solve? Changing the template processor configuration from within a template that it is currently processing doesn't seem wise to me.


That being said, the reason that only the stash variables are accessible is because they are all that are provided to TT by default...

package MyApp::View::TT;

sub template_vars {
        my ( $self, $c ) = @_;

        my %vars = $self->SUPER::template_vars( $c );

        $vars{ 'ttconfig' } = $self->config;

        return %vars;
}

--
Jason Kohles
[EMAIL PROTECTED]
http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire



_______________________________________________
List: [EMAIL PROTECTED]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to