In CakePHP each method of a Controller has its own View and the view template file is the name of the method.
class DataController extends AppController { public function one() { // will render one.ctp } public function two() { // will render two.ctp } } Accourding to the API documentation there is a $view property of the Controller that specifies the view to render. So I should have the ability to specify a default view file, say all.ctp, for all methods of a controller
class DataController extends AppController { public $view = 'all'; public function one() { // should render all.ctp } public function two() { // should render all.ctp } } However this does not work and CakePHP ignores the $view property and continues to look for the template file of the same name as the method.
Is there a way to have a default view without having to insert $this->render('all'); in each of the Controller's methods?