[Catalyst] using uri_for to parsing parameters
Mesdaq, Ali
amesdaq at websense.com
Thu Mar 18 19:34:29 GMT 2010
=93so how do I parse the $book_id if I don't want to hard code the URL.=94
I am a little confused by that statement. What do you mean parse $book_id y=
ou already know the book_id. Are you basically trying to redirect the user =
back to the URL they came from?
Thanks,
------------------------------------------
Ali Mesdaq (CISSP, GIAC-GREM)
Sr. Security Researcher
Websense Security Labs
http://www.WebsenseSecurityLabs.com<http://www.websensesecuritylabs.com/>
------------------------------------------
From: nhyda [mailto:nhydanhyda at gmail.com]
Sent: Thursday, March 18, 2010 9:38 AM
To: Catalyst at lists.scsys.co.uk
Subject: [Catalyst] using uri_for to parsing parameters
I don't know whether someone has asked it yet.
here is my situation.
I have an action "find" that take one argument of book id
and I have another action author that chained to find
so in practice I use /find/1/author to list all the authors of book 1.
now I want to capture the book id use form but still use the action "find" =
and "author"
so in action "form_do",
I use
$c->response->redirect($c->uri_for("/find/$book_id/author"));
but I have learned that $c->uri_for($self->action_for('author')*** should b=
e a better approach.
so how do I parse the $book_id if I don't want to hard code the URL.
Thank you very much.
Click here<https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg=3D=3D> to =
report this email as spam.
Protected by Websense Hosted Email Security -- www.websense.com =
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100318/e4d1a=
e2c/attachment.htm
More information about the Catalyst
mailing list