Cakephp - Using the same view for multiple controler functions

less than 1 minute read

Question: I have a Cakephp project the controller has several different methods.

function Index() function IndexAuthor()

And I want to use the same ‘view’ (or template, Index.ctp) for both of the methods of the control.


You’re looking for Controller::render(). function IndexAuthor() { $this->autoRender = false ; $this->render('/stories/admin_index'); }


Leave a comment