I have an application (built in 1.1, though may get upgraded to 1.2 if
it helps my situation) that needs an additional prefix route added to
it. For example, see the 1.2 manual entry here:
http://book.cakephp.org/view/544/Prefix-Routing

My application already has admin routing, but I now need to move all
the public (or non-admin routed) pages to a sub-directory (call it
"sub1"), and add an additional sub-directory as well (call it "sub2").

My dilemma is that I need sub1 and sub2 to use the exact same
controller functions instead of having their own. Normally when using
prefixing, you write a function to correspond with the specific prefix
in use. For example, www.website.com/admin/users/edit/3 would actually
call UsersController::admin_edit(). Likewise in the manual entry I
linked to above and for my hypothetical example the URL
www.website.com/sub1/locations/view/3 would call
LocationsController::sub1_view(). This is a problem for me because I
really want that URL to call LocationsController::view() instead. I
also need www.website.com/sub2/locations/view/3 to call
LocationsController::view() as well.

I plan to set session data in AppController to distinguish which sub-
directory (sub1 or sub2) the current user is in. That value will then
affect my model queries.

The further issue is that additional sub-directories (which are
essentially instance copies of the application) will need to be
dynamically added via the admin interface as well. This is why I want
to handle the situation with a mod_rewrite customization or with
Cake's routing.

Any help or assistance is greatly appreciated! I'm also on IRC as
etipaced. Thank you for reading :)
--~--~---------~--~----~------------~-------~--~----~
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