On Wed, 2009-12-16 at 16:18 +0300, Alex Povolotsky wrote:
> Hello!
>
> Having, for example, /controller/*/action handled by /controller/base
> (1) => /controller/action, how do I write correct go to
> /controller/argument/action ?
>
> just $c->go('/controller/argument/action') does not work.
> $c->go('/controller/action', [qw(argument)]) does not work as well,
> while $c->detach('/controller/action', [qw(argument)]) seems to be working.
>
> Actually, I'm looking for some kind of internal redirect.
If you want an actual redirect you can do something like this:
$c->res->redirect($c->uri_for($c->controller('controller')->action_for('action'),
[qw(argument)]));
$c->detach();
That will work it's way through the chain and should be seamless for the
end user when accessing the page.
--
o) Derek Wueppelmann (o
(D . [email protected] D).
((` http://www.monkeynet.ca ( ) `
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/