On Mon, Nov 3, 2008 at 2:57 PM, Todd M <[EMAIL PROTECTED]> wrote:
>
>
> 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.

If I understood the point, I think you could do a redirect
inside the index action of your posts controller, like that:

function index() {
    // ...
    $this->redirect("/posts/add/5");
}

Best regards.

--
MARCELO DE F. ANDRADE (aka "eleKtron")
Belem, PA, Amazonia, Brazil
Linux User #221105

[EMAIL PROTECTED] ~]# links http://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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to