So the ultimate goal is to get rid of the "pages" or "posts" part of the url http://example.com/pages/home, without having to specify a new route definition for every page.
So instead of http://example.com/pages/home it would be http://example.com/home.
So my idea is to have the following happen when a page is loaded (ignoring plugins and route definitions in this example)....
- Cake checks for a controller named 'home'
- If controller does not exists it tries to use the default action in a specified controller (like the pages controller) instead of displaying the controller does not exist error.
/products <--which is a controller
/home <-- which is not a controller
and /home will be passed as a parameter to a controller I have called 'cms_controller' for display instead of using something like /cms/home.
Anyone done this already?
Anyone have any ideas on whether this is possible to implement in routes.php, bootstrap.php, or app_controller.php?
Any input is appreciated.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---