Quick CakePHP Tip: Prefix/Admin Routing and form->create()
A quick tip to get your forms to play nice with admin routing:
/views/users/edit.ctp
Why? For some reason, $form->create() ignores the usual routing prefix attribute ("admin"=>true) so you have to pass the url through $html->url() which does take prefix routing into account.
The last true param tells $html->url() to return an absolute url (from your site route).


Comments
Well, thank you man, you
Well, thank you man,
you saved me! :)
Is there a bug report somewhere about this?
I couldn't find one.
Post new comment