Tuesday, September 18, 2012

Change view folder inside a Controller


Hi all,

how can change the view folder inside a controller?

Here is my solution. Thats work but is that ok? Any other solution is cake possible?

class BackendController extends AppController {

    public $viewFolder = 'Frontend';

    public function index(){
         $this->view = "../$viewFolder/index";
    }
    
}

Want to Change from app/view/backend to app/view/frontend/
    


No comments: