Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COI have incorporated the CakePHP solution you showed above into my current code, with a few changes. Instead of having the actions for both default and 'admin' requests in the same Controller, I have made it so there is an "Index_Controller" located in "controllers/indexController.php", as well as "Admin_Index_Controller" in "controllers/admin/indexController.php". I think this solution will work, unless you can see something wrong with it..? Regarding #2: Do you mean I should add a 'views' and 'models' folder outside the app dir? Or just add a 'views/common' dir and 'models/common'?
      singulars
    2. COQuick question.. does that MyController class call other controllers?? If my Routing class (see my comment to antpaw's answer) can configure which controller/action to run, would that MyController class be necessary? I don't quite see why you initiate a controller -just- to initiate other controllers.. But maybe I just don't know enough about MVC or Cake..
      singulars
    3. CO1. The Admin_Index_Controller seems like a reasonable solution. It has the benefit of separating admin an regular logic in two diffent classes. 2. I don't exactly get what you mean by call other controllers, its just "the controller", the routing system looks at the url and maps it to this class. The admin_index function is just the code behind a regular action, is just routed a little bit different. Instead of /mycontroller/admin_index/ it would map to /admin/mycontroller/index/ because of the configuration
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload