CakePHP: changing the default view instead of home.ctp

As a title, how can I change the default view without placing home.ctp in applications / views / pages / folder?

let's say I want the default homepage to display /views/other/index.ctp.

Where can I change the encoding? in which files is this connected? Thanks.

+4
source share
1 answer

Create OtherController :

 // app/controllers/other_controller.php class OtherController extends AppController { public function index() { // do something } } 

and specify the root path in app/config/routes.php to it:

 Router::connect('/', array('controller' => 'other', 'action' => 'index')); 
+15
source

Source: https://habr.com/ru/post/1341591/


All Articles