Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Catalyst Framework - target tt2 view

by solegaonkar (Beadle)
on Sep 18, 2014 at 07:15 UTC ( [id://1101001]=perlquestion: print w/replies, xml ) Need Help??

solegaonkar has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks! Need some help with Catalyst framework I have an application that uses Catalyst. The Root.pm controller performs some checks before passing it over to the tt2. I need to skip this for some pages. But, I am not able to identify the target view tt2 in the root controller. Can you please help!

Replies are listed 'Best First'.
Re: Catalyst Framework - target tt2 view
by rnewsham (Curate) on Sep 18, 2014 at 09:00 UTC

    If you want to change the view for a page/method inside a controller you can do this.

    $c->stash->{current_view} = 'OTHER_VIEW';
Re: Catalyst Framework - target tt2 view
by Your Mother (Archbishop) on Sep 18, 2014 at 15:46 UTC

    Besides changing the view, as suggested, if you’re using sub end : ActionClass('RenderView') {}, Catalyst::Action::RenderView—and you probably should be—then all you have to do is write something to the body and the view processing will be skippped. E.g.–

    sub moo : Local Args(0) { my ( $self, $c ) = @_; $c->response->body("OHAI, COW!"); }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1101001]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-04-23 12:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found