Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated controller parent class preAction

...

Code Block
languagephp
firstline1
title/plugins/my_plgn/my_plgn_controller.php
linenumberstrue
<?php
class MyPlgnController extends AppController {
    public function preAction() {
        // Set the view directory to the default core view directory so that AppController preAction code uses the appropriate
        // directory for the structure file
        $this->structure->setDefaultView(APPDIR);
        parent::preAction();
 
        // Override default view directory
 with that of the    $this->view->view = "default";plugin 
        $this->structure>view->view = "default";
    }
}
?>

...