That's a big help, but not enough to fix the issue.  In fact just the
opposite.
I'm not trying to adjust the controller to the URL, I'm trying to
adjust the URL in the controller.

The issue I'm having is when I tell Cake that I want to use the
'Vinny' Controller, it runs off and grabs VinnyController, but then
tries to forward that to /vinnies/ instead of /vinny/.

For instance, when I create a form using $form->create('Vinny'); in
the form, as the action attribute of the tag, it has "/vinnies/add".
The URL I am using is /vinny/ask.

Now I can fix the "/add" part by adding array('action' => 'ask') to
the create from method, but it is still setting "/vinnies/ask" as the
action, which is close, but not quite right.

And now I have found out that $form->here does not work for instances
where the main site script is not in the root directory of the server.

Thanks for the info though.

On May 15, 10:23 am, Joel Perras <[EMAIL PROTECTED]> wrote:
> http://book.cakephp.org/view/39/configuration#routes-configuration-46
>
> -Joel.
>
> On May 15, 11:18 am, benjam <[EMAIL PROTECTED]> wrote:
>
> > I have a section of my site called 'Ask Vinny' and I would like the
> > URL to look something like mysite.com/vinny (not mysite.com/vinnies)
> > so I renamed the controller and moved the views into the vinny/ dir,
> > and it works fine, except that when submitting the 'ask question' form
> > ( @ vinny/ask), it tries to submit to vinnies/add instead of vinny/
> > ask.
>
> > I fixed the ask part by setting 'action' => 'ask' in the $form->create
> > options array, but when I tried to set the controller, it still goes
> > to vinnies/ask, and not vinny/ask.
>
> > I finally got it working by setting 'url' => $form->here in the
> > options, but I don't want to have to do this for every form I create.
>
> > Is there a way to set something in the controller (or anywhere, the
> > model maybe?) that tells it not to pluralize the controller name when
> > going to dynamically created URLs?   Or a way to set the controller
> > (or model) up so that it knows to go to vinny/ and not vinnies/?
>
> > Thanks.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to