by default cake displays the home.ctp from  views/pages (the default cake
set up displays static ctp files)
Router::connect('/', array('controller' => 'pages', 'action' => 'display',
'home'));

you can also view the home ctp (cake template) at /pages/home
Router::connect('/pages/*', array('controller' => 'pages', 'action' =>
'display'));

if you create a cake page view (a ctp file in views/pages/) eg about.ctp in
APP/views/pages/
it will then be available at example.com/pages/about

to make the index of posts display from the root of you site instead of
pages/home.ctp you add this to you config/routes.php (and remove the line
that connects to pages display home)

Router::connect('/', array('controller' => 'posts', 'action' => 'index'));

- S



On 16 May 2010 17:50, Davor Ilic <[email protected]> wrote:

> Hi,
>
> im newbie with the cakePHP.
>
> I made the Tutorial "The 15 min Blog 
> Tutorial<http://book.cakephp.org/view/219/the-cakephp-blog-tutorial>"
> ok that was easy. But do not know how to make an index for the root, how
> does this work how i say to the controller if there are no params in url
> they have to took the index.ctp of "/posts/index.ctp"?
>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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