Re: Cake Url Alias - anyone used it before?

2007-08-20 Thread Matt

I am having trouble working out how to call a specific controller from
my AppError class - any suggestions?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Cake Url Alias - anyone used it before?

2007-08-08 Thread Matt

Has anyone had much experience on using CakeUrlAlias (http://
www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/) on a site?

It's the perfect solution for my needs as I need something that
catches URLs that don't match up with a controller, passes those URLs
onto another controller, which then looks it up in the database. If it
matches in the database it will display that content, otherwise it
returns a 404 error.

However I am having trouble getting it to work for two reasons:-

1. It doesn't handle admin routing, though this could be easily
addressed by modifying the CakeUrlAlias_ControllerExists function.

2. When I do throw a 404 error using $this-cakeError it always
crashes Apache


--~--~-~--~~~---~--~~
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: Cake Url Alias - anyone used it before?

2007-08-08 Thread Felix Geisendörfer
I'm the one who wrote that post. By now there are better solutions 
available to handle this problem. I'd suggest to check out the AppError 
class and how you can use it to catch the missingController error. You 
will however need to take care of recursion yourself.

-- Felix
--
My Blog: http://www.thinkingphp.org
My Business: http://www.fg-webdesign.de


Matt wrote:
 Has anyone had much experience on using CakeUrlAlias (http://
 www.thinkingphp.org/2006/05/17/url-aliases-for-cakephp/) on a site?

 It's the perfect solution for my needs as I need something that
 catches URLs that don't match up with a controller, passes those URLs
 onto another controller, which then looks it up in the database. If it
 matches in the database it will display that content, otherwise it
 returns a 404 error.

 However I am having trouble getting it to work for two reasons:-

 1. It doesn't handle admin routing, though this could be easily
 addressed by modifying the CakeUrlAlias_ControllerExists function.

 2. When I do throw a 404 error using $this-cakeError it always
 crashes Apache


 

   

--~--~-~--~~~---~--~~
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: Cake Url Alias - anyone used it before?

2007-08-08 Thread Matt

Thanks for the pointer Felix. Based on what you are saying the best
solution would be something along these lines:
http://cakebaker.wordpress.com/2006/06/15/writing-a-custom-error-handler/


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---