Alas, when I do that, I get: http://localhost/cakeapps/sitevisits/cakeapps/sitevisits/orders/add/1
But it really matters not...it works as-is, and I'm okay with it. :) --Carl On Aug 20, 10:59 am, Jamie <jamie....@gmail.com> 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. > > - Jamie > > On Aug 20, 7:46 am, carl67lp <ccander...@gmail.com> wrote: > > > AD: > > > That helps quite a bit. It didn't quite get me there...what I end up > > with is a resulting URL of: > > > /sitevisits/orders/orders/add/1 > > > Note the duplication of "orders". With a bit of mucking about, I > > ended up with this: > > > $parts = explode('/', $this->params['url']['url']); > > $vid = array_pop($parts); > > echo $form->create('Order', array('url' => array('controller' => > > 'orders', 'action' => 'add', $vid))); > > > This seems to work perfectly (unless, of course, I'm missing something > > that would lead to unexpected behaviour!). > > > Thanks for your assistance. > > > --Carl --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---