[Catalyst] Generate a URL for a given action

Bogdan Lucaciu bogdan at wiz.ro
Thu Aug 31 18:13:40 CEST 2006


On Thu, 2006-08-31 at 08:28 -0700, John Napiorkowski wrote:
> because I already have the title in the database resultset and I know
> right now this controller is rooted to the start of the web server.
> What I would really like to know is if there is a programmatic way to
> get this stuff.  I know I can get the capture string via:
> $c->request->captures->[$level].  Ideally I wouldn't have to hard code
> so much controller specific stuff here.
> 

try
$c->uri_for($c->controller('Foo::Bar')->action_for('action_name'));

(action_for documented in Catalyst::Base)

-- 
Bogdan Lucaciu <bogdan at wiz.ro>




More information about the Catalyst mailing list