You can't separate controllers into folders like you can in CodeIgniter/Zend. You would have to use prefixes, which is only present in 1.3, which is still alpha.
Or you can create separate plugins for each member/manager/admin, but that becomes too much. Or you just use 1 controller, and use an ACL type system that determines what they can and cannot do. On Nov 5, 7:45 am, lauraw <[email protected]> wrote: > I'm trying to figure out the best way to organize controllers based on > user roles and could use some advice. I know there are experienced > people here who have had to deal with this already :-). > > I have controller folders setup as: > > member/ > manager/ > admin/ > > They all deal with products and I don't want to have one > ProductController at the controllers/ level that has all the functions > (view a product, add a product, delete a product). This is the way I'd > like to set it up: > > member/product_controller - view() > manager/product_controller - add() > admin/product_controller - delete() > > What is the best way to accomplish this division of controller > functionality? I know that I can modify the paths for controllers in > bootstrap.php, but if I have the same controller under multiple > locations, which one will cake find? The first in the list I assume? > The other solution I was thinking of is to name the controllers > differently, but is this the best way to do it? > > mem_product_controller > mgr_product_controller > adm_product_controller > > I'm new to CakePHP ... I'm not sure if this is doable with cake's MVC > naming conventions. > > Thanks for your help! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
