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
Post new comment