1) create files:
        "/app/views/pages/home.ctp"
        "/app/views/pages/mystaticpage.ctp"

2) open file "/app/config/routes.php", which route any specific url to
corresponding page. Edit following codes:
   /*** this is for http://localhost/app/ ***/
   Router::connect('/', array('controller' => 'pages', 'action'
=>'display', 'home'));

 /*** this is for http://localhost/app/mystatic/   ***/
 Router::connect('/mystatic', array('controller' => 'pages', 'action'
=> 'display', 'mystaticpage'));

   Notice know the controller is "PagesController", action is
"display".

3) Done. Check by open url:
    http://localhost/app/
    http://localhost/app/mystatic/

Good Luck.

On Jul 10, 10:50 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Could some one please help me setup my home page.
> i have a static page to be set as homepage with some hyperlinks.
> i am new to php aswell as cakephp.
> where should i place the home.ctp file,
> then should i have a controller to that.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to