This may be worth reading:

http://bakery.cakephp.org/articles/view/custom-urls-from-the-site-root
http://bakery.cakephp.org/articles/view/taking-advantage-of-the-pages-controller
http://snook.ca/archives/cakephp/static_pages_cakephp12/

Regards,
- Dardo Sordi.

On Sat, May 31, 2008 at 2:00 PM, Turnquist, Jonah <[EMAIL PROTECTED]> wrote:
>
> Hey I'm just starting to learn cakephp and have a question...  I was
> wondering what the best way to handle static pages and the home page
> is.  This is what I've done:
>
> In the routes file I added:
> Router::connect('/', array('controller' => 'pages'));
>
> And I commented out these two lines:
> //Router::connect('/', array('controller' => 'pages', 'action' =>
> 'display', 'home'));
> //Router::connect('/pages/*', array('controller' => 'pages', 'action'
> => 'display'));
>
> So now the top directory (the home page) routes to PagesController-
>>index(); and it uses the view pages/index.ctp
> Furthermore if I want a static /about page I create the route:
> Router::connect('/about', array('controller' => 'pages/about'));
> And now /about routes to PagesController->about(); and uses the view
> at pages/about.ctp
>
> Using this method I have to create a new route for every static page
> as well as add an event for each static page in the PagesController.
>
> Is this the best method or is there a better way?  I feel like I just
> made this way of doing static pages up and it's not the way they are
> meant to be handled.
>
> Also on an unrelated note, how do I find threads that I previously
> made in google groups?  Yesterday I made a new post and it took 6
> hours to appear.  And to see if it had any replies I have to search
> through the Topic list
>
> Thanks
>
> >
>

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

Reply via email to