I've got a couple applications that need to be set up with a "Parent"
and "Child" architecture. I've got a couple sites that are almost
identical except for some layouts and sometimes a couple small
function differences (usually pretty minimal).
I've been handeling this by baking a "master" project, then my child
projects.
I think bootstrap the child projects to share controllers, views,
models, ect., ect...
The current problem is if I want to keep all the 'actions' of a
current controller and only modify one of them.
What I tried was to create a new controller in the child project like
this:
<?php
include_once ('/var/www/master/controllers/
coupons_controller.php');
class CustomCouponsController extends CouponsController {
function index() {
echo "Use this instead of Master's!";
}
}
?>
I then create a route and do this:
Router::connect('/coupons/', array('controller' =>
'custom_coupons'));
This actually works perfect (so far) except for one problems.....
When cake driven URL's are created they are created with
"custom_coupons" instead of just "coupons".
Also, does anyone have a better idea for getting this to all work for
me? So far it's been nice but I'm hoping I don't run into a bunch of
problems down the road.
-Jesse
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---