Re: hierarchical controllers

2006-08-02 Thread [EMAIL PROTECTED]

I asked the same question a month ago. Someone suggested using plugins.
I have nog tried this yet, but it looks like the way to go. The only
'problem' is that it's not really hierarchical, because you can only
separate your controllers into folders, not subfolders into that etc.

See
http://groups.google.com/group/cake-php/browse_frm/thread/e1ab09307c2898b2/46eda28e81620220


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: hierarchical controllers

2006-08-02 Thread meek

If it's simply a question of organizing your controllers into
subfolders, you can specify additional controller paths in your
app/bootstrap.php like this:

$controllerPaths = array(CONTROLLERS.subdir1.DS,
CONTROLLERS.subdir2.DS);

- You can do the same for models and views. The paths can point to
anywhere on your system.

This won't change the routing though. As suggested above, using admin
routes would allow you to use urls like /admin/blog/edit/1 with a
controller called blog and actions called things like admin_edit.

One, as far as I know, undocumented advantage with admin routes is that
you can easily password-protect them with http authentification. If you
set up .htaccess to password-protect a directory called 'admin' in your
root directory (so alongside 'cake' and 'app') then all of your admin
routes will have this simple form of protection.

Another way of separating admin and frontend actions into two
controllers would be to break the Cake naming conventions and put your
admin actions into a controller called BlogAdminController.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: hierarchical controllers

2006-07-31 Thread Samuel DeVore

There is an admin routing feature you might want to look at

http://manual.cakephp.org/chapter/4  in section 4

It's a different way to do what you might be thinking about.  And no I
do not believe that there is builtin support for hierarchical
controllers

Sam D

On 7/31/06, Neves [EMAIL PROTECTED] wrote:

 Hi,

 Is possible to have hierarchical controllers like:
 /admin/blog/edit/1 where admin is a folder with others controllers
 related do the admin of the site.


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: hierarchical controllers

2006-07-31 Thread AD7six

Plugins are an easy way to organize things too, a plugin is a mini,
self contained app

see http://manual.cakephp.org/chapter/13

Cheers,

AD7six


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---