As title, how can I change default view without placing home.ctp in apps/views/pages/ folder?
lets say, I want the default home page to show /views/other/index.ctp .
Where should I change the coding? which files does it involved? Thank you.
Create an OtherController
:
// app/controllers/other_controller.php
class OtherController extends AppController {
public function index() {
// do something
}
}
and point the root route in app/config/routes.php
to it:
Router::connect('/', array('controller' => 'other', 'action' => 'index'));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With