If it's simply a question of organizing your controllers into
subfolders, you can specify additional controller paths in your
app/bootstrap.php like this:

$controllerPaths = array(CONTROLLERS."subdir1".DS,
CONTROLLERS."subdir2".DS);

- You can do the same for models and views. The paths can point to
anywhere on your system.

This won't change the routing though. As suggested above, using admin
routes would allow you to use urls like /admin/blog/edit/1 with a
controller called blog and actions called things like admin_edit.

One, as far as I know, undocumented advantage with admin routes is that
you can easily password-protect them with http authentification. If you
set up .htaccess to password-protect a directory called 'admin' in your
root directory (so alongside 'cake' and 'app') then all of your admin
routes will have this simple form of protection.

Another way of separating admin and frontend actions into two
controllers would be to break the Cake naming conventions and put your
admin actions into a controller called BlogAdminController.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to