On Mon, Jun 2, 2008 at 12:59 AM, Turnquist, Jonah <[EMAIL PROTECTED]> wrote: > > I tried this one: http://snook.ca/archives/cakephp/static_pages_cakephp12/ > > It did not work. I saved the file in app/error.php and it didn't seem > to effect a thing. I had a test.ctp vew in both the /views and /views/ > pages directory (I wasn't sure where it was supposed to be so I tried > both) and they did not load.
I think I tried that as well (can't say for sure because that's a bad link) with no luck. > So then I tried this method: > http://bakery.cakephp.org/articles/view/taking-advantage-of-the-pages-controller > It works! Someone commented though that it will mess up admin routing This is the method my version is based on. For the admin route issue, there's a fix in the comments: $Route->connect ('(?!admin|items|images)(.*)', array('controller'=>'pages', 'action'=>'display')); But there was another reason why I had to specify each directory (and its index page). I can't remember why just now. > (haven't learned what that is yet). So I am not sure if I should > search for a different method. Does anyone know any good ones? That > does not require a route for each static page? I think the above is it. If one wants to avoid spelling out each file, and a "pages" prefix is (understandably) unwanted, then a wildcard pattern is pretty much all that's left. I can't imagine any other way to do it. It's the same whether the pages are static ctp files or retrieved from the DB. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
