Thanks for search link though.
Perhaps its how I interpret what the routes do.
I think I understand how the routes work. Correct me if I'm wrong. The
default routing is using the htaccess mod_rewrite.
Using the blog tutuorial example. If I wanted to go to the controller
posts->add($id) I would use this as my url
www.example.net/posts/add/5 (for $id=5).
If I wanted to do something different, such as whenever I get
www.example.net/posts/5. I could write some route connection code to
translate it to posts/add/5. This is how I understand the cake's
routes.
However, this is where I have the disconnect. The external website
that calls my cake code will alway just call www.example.net/posts.
It will never call www.example.net/posts/add/5, www.example.net/posts/add,
or www.example.net/posts/5. It would store the action & id in the
$_POST array. I believe the only way that I can do this is to have the
posts->index() (default controller action) and parse the $_POSTS and
then recall the dispatcher with a posts/add/5 as url.
Being new with this framework. I just wanted to know if I'm missing
something basic that handles this workaround.
Regards,
Tdd
On Nov 3, 11:34 am, "Marcelo Andrade" <mfandr...@gmail.com> wrote:
> On Mon, Nov 3, 2008 at 10:09 AM, Todd M <toddmetc...@gmail.com> wrote:
>
> > I'm a newbie here, but I think I understand the whole url/controller/
> > action/parm1/parm2 routing convention. However is there a way that
> > you use the _POST array to rout to the correct action/parm's
>
> > For instance, I'll always be using thewww.example.net/my_controller,
> > which takes me to the my_controller->index(); I would like to look at
> > the _POST array and redirect it to the my_controller-
> >>special_action();
>
> Read about CakePHP routes.
>
> http://www.google.com.br/search?q=cakephp+routes
>
> Best regards.
>
> --
> MARCELO DE F. ANDRADE (aka "eleKtron")
> Belem, PA, Amazonia, Brazil
> Linux User #221105
>
> [gus@pará ~]# linkshttp://pa.slackwarebrasil.org/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment