Re: Routes, pages and controllers
Good information guys, thanks. I'm trying to do the opposite of Ian, in a way. I would like to setup a route that connects a particular controller if a request is made that is not found. Iow, something like this: domain.com/anythingyouwant => MyController domain.com/hello_world => MyController domain.com/existingcontroller/real_action => ExistingController (calling real_action() method) I'm wondering if I need to manually create a route for each and every one of my existing controllers, then do the 'catch all' route at the end of that. I was hoping for a more elegant solution, however. Many thanks for any input. - Kevin --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: softDelete, would anyone find useful enough....
I definitely have the use for this functionality in 2 of my current projects. Although, I only need to perform the soft delete on certain tables, and not everywhere. What would be the best way to make this functionality modular so I can quickly and easily utilize either a soft or hard delete within my controller? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Suggested dir structure for public site with admin control underneath?
Thanks to Dan and Clemos for the feedback here. I have enough to keep me busy for a while and I think I'm finally starting to understand the process here. On Feb 1, 11:26 am, "Dan" <[EMAIL PROTECTED]> wrote: > Thanks Clemos! > > That's pretty much what I've been aiming for ;) > > Many thanks > > On Feb 1, 5:20 pm, clemos <[EMAIL PROTECTED]> wrote: > > > hi Dan > > > you should start from here:http://manual.cakephp.org/chapter/configuration > > especially > > "Section 4 Advanced Routing Configuration: Admin Routing and Webservices" > > > in your case, you'll probably want to set CAKE_ADMIN = 'console' > > this is for the "directory structure" (or rather "url structure") > > it allows you to have special actions in your controllers, for exemple > > "admin_action()", which you can call with this url > > :http://domain.com/console/controller_name/action/foo... > > > then, as said in the manual, you'll need to build an authentification, > > session and user management system on top, or use one that already > > exists. > > I personnally use a customized version of othAuth for > > user/group/permissions and auth/session handling, as it's powerful and > > has an easy support for CAKE_ADMIN > > routing.http://bakery.cakephp.org/articles/view/148 > > > > > clemos > > > On 2/1/07, Dan <[EMAIL PROTECTED]> wrote: > > > > Hi there, > > > > I'm backing a simple CMS system with the awesome Cake and am wondering > > > about best practices for the directory structure. > > > > In a nutshell I'd like > > > >http://domain-> main public pages > > > >http://domain/console-> access to views, etc via authenticated > > > session > > > > at the moment I'm using a view called 'www' to house the public pages > > > and using a routeing config to push the user there. > > > > Is this an okay way to go? > > > > Many thanks > > > > Dan --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Suggested dir structure for public site with admin control underneath?
Bumping this question as I am trying to do the exact same thing. I would like a public frontend for displaying information only, but then a password-protected backend/content manager (with a different interface and template, too) for handling the site functionality (file uploads, content updates, etc). For Dan, I'm not quite sure what you're doing exactly. You have a view called 'www', does this mean you have a file named www.thtml in your views dir? If so, then it sounds like your default 'index' view of your application simply calls this file. Am I understanding you correctly? I'm a newb at Cake so I'm trying to figure out as much as I can as quickly as possible! Thanks for your help. - Kevin --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: A "Virtual Fields" solution using afterFind
Thanks for the reply. I commented out the constructor and am no longer seeing the error. However, I have this function in my model: function addFieldDisplayName($x) { return $x['ln'].', '.$x['fn']; } But when I try this in my controller it doesn't work: $this->set('contacts', $this->Address->Contact->generateList(NULL, NULL, NULL, '{n}.Contact.id', '{n}.Contact.DisplayName')); Shouldn't the addFieldDisplayName() function allow me to use the {n}.Contact.DisplayName placeholder? Instead, I get the proper id values in my option tags, but nothing in the text portion (between the I mean). Many thanks, again. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: A "Virtual Fields" solution using afterFind
I am getting a Warning when I try to implement this code: cake/vendors/mylib/Url.php "failed to open stream: No such file or directory in..." Looks like a need the Url.php file in order to use this? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---