Hi, I'm wondering how to use route to get different sections in Admin; in
this way:

1-Users controller handles all users, front end users and administrators.
2-The field users.is_admin determines user's role.

3-I would like to get /admin/users/:Action/ to list and edit users where
users.is_admin = 0; and /admin/admins/:action/ to list, edit and create
users with users.is_admin = 1.

I though using routes is the way to get it working, but I can not find
exactly how.

I've tried with the followings lines; 1 line each time, having different
results. Sometimes Cake says a controller is missing (AdminsController),
sometimes it overrides "/admin/" in the URL.

Router::connect('/admins/', array('controller' => 'users', 'isadmin' =>
'true'));
Router::connect('/admin/admins/', array('controller' => 'users', 'isadmin'
=> 'true'));
Router::connect('/admin/admins/:action/', array('controller' => 'users',
'isadmin' => 'true'));
Router::connect('/admin/admins/:action/*', array('controller' => 'users',
'isadmin' => 'true'));
Router::connect('/admins/:action/*', array('controller' => 'users',
'isadmin' => 'true'));



Any ideas or link to suggest?


Thanks in advance, good cooking.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to