Reputation: 55
I'd like to have a custom layout for the indexpage only, the rest of the pages can use the default.ctp.
I've read on different forums and blogs on how to do this, but I can't quite figure it out.
What I have so far in the app/Config/routes.php:
Router::connect('/', array('controller' => 'newsposts', 'action' => 'start', 'home'));
This works fine, but results in the default.ctp being used. I've already added a home.ctp in the app/View/Layouts folder.
Now, how do I make use of the home.ctp instead of the defautl.ctp only on the homepage? I've read something about adding some lines in the beforeFilter() in app/Controller/AppController.php but I have no clue on how to do this...
Upvotes: 0
Views: 168