can somebody clarify this things to me, cos I started to develop my site and Im so confused now.
1)I copied pages_controller to my app/controllers/ and added index() and about() method and added index.ctp layout to app/view/layouts (and changed in app/config/routes.php - Router::connect('/', array ('controller' => 'pages', 'action' => 'index', 'index')); ) so going to my root in www, everything is fine. layout is displayed. but now when I go to host.com/about (host.com/about.html or whatever) I see error page telling me that about_controller is not found. from documentation Im getting that default routes http://example.com/controller/action/param1/param2/param3 to controller:action(param1,..) so why now Im getting the error like this, or should I add some routing to handle situation like above, so my question is should I every time route cake with every link I create or can I stay with defaults but should start thinking in some way. in another words how cake knows that url part refers to controller or action. in genral what I need for now are links like that page.com/ page.com/about page.com/products page.com/products/product1 so I thought that ill create pages_controller:index()/about() and products_controller:index()/product1 or again products1_controller if needed. 2) If I create abouts_controller and put it into app/controllers/ I will be notified that I dont have table in my db that maps to about. but what if I dont want to get data from db? even though I created empty model about.ctp the problem still persist. I tried to $this- >loadModel('); but no luck. second question is how to avoid models to be persisted from db or is that only pages_controller for static (no db) pages. and third as I assume views are totally optional cos they always render within used layout and this can be totally static and this doesnt implies errors that Im getting?? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---