On 20 ago, 16:59, Jamie <[email protected]> wrote:
> That might work, but I think you'd agree that it's a bit hacky. If
> you're working with this URL:
>
> /orders/add/1
>
> Which, following Cake naming conventions, translates to
> OrdersController::add() with an id of '1', then all you really need to
> do is specify $this->here for the form URL, rather than working with
> $this->params['url']['url']. So:
>
> echo $form->create('Order', array('url' => $this->here));
>
> That's the syntax I use for my form URLs, and I never have issues with
> disappearing variables, duplicating elements, etc.

You evidently never develop with http://domain/project/in/a/subfolder
;)

if you're at http://localhost/myapp/foo/bar/fum

$this->here is 'myapp/foo/bar/fum"
$this->params['url']['url'] is "foo/bar/fum"

(or similar)

It was a minor oversight that the url param doesn't have a / prefix

I use/meant to say '/' . $this->params['url']['url']

AD
--~--~---------~--~----~------------~-------~--~----~
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