I was answering his question. I don't know what his actual situation is - perhaps he simplified his scenario when he asked his question. Also the answer is useful to someone else who might have a legit reason for wanting an alternate folder structure. Thanks though, for your useful input.
On Apr 29, 8:00 pm, Miles J <[email protected]> wrote: > Yeah but if you are going to do that, you might as well just use > plugins, lol. > > On Apr 29, 6:38 pm, gremlin <[email protected]> wrote: > > > > > App::build( array( > > 'controllers' => array( > > DS . join( DS, array( 'parts', 'to', 'your', 'path' ) . DS, > > ... other paths for controller lookup > > ), > > )); > > > should work for you. I am not sure if you need to set the "normal" > > path as one of the array items or not. Play around and let us know. > > > On Apr 29, 10:12 am, Miles J <[email protected]> wrote: > > > > Well its simple. You cant put controllers within subfolders. Cake > > > doesn't support it. > > > > If you want to put controllers within subfolders, you have to make it > > > a plugin. > > > > On Apr 29, 7:38 am, Matthew <[email protected]> wrote: > > > > > Here is my basic file structure > > > > > app/controllers -> > > > > /categories/categories_controller.php > > > > /news/news_controller.php > > > > /users/users_controller.php > > > > > First attempt (default controller paths): > > > > $controllerClasses = App::objects('controller'); > > > > debug($controllerClasses); > > > > > Result: > > > > Array > > > > ( > > > > [0] => Pages > > > > [1] => App > > > > ) > > > > > (These are found in cake/libs/controller) > > > > > Second attempt (passing controller paths): > > > > > $App =& App::getInstance(); > > > > $paths = $App->controllers; > > > > debug($paths); > > > > > $controllerClasses = $App->objects('controller',$paths); > > > > debug($controllerClasses); > > > > > Result: > > > > Array > > > > ( > > > > [0] => /home/pokey/public_html/cakephp/app/controllers/ > > > > [1] => /home/pokey/public_html/cakephp/app/ > > > > [2] => /home/pokey/public_html/cakephp/cake/libs/controller/ > > > > ) > > > > > Array > > > > ( > > > > [0] => Pages > > > > [1] => App > > > > ) > > > > > It doesn't appear to be finding controllers recursively which doesn't > > > > make sense because they are supposed to be in sub-folders. > > > > > Check out the new CakePHP Questions > > > > sitehttp://cakeqs.organdhelpotherswith their CakePHP related questions. > > > > > 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 athttp://groups.google.com/group/cake-php?hl=en > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers > > > with their CakePHP related questions. > > > > 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 > > > athttp://groups.google.com/group/cake-php?hl=en > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others > > with their CakePHP related questions. > > > 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 > > athttp://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > 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 > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
