core/web/Controller.php
public function getViewPath()
    {
        if ($this->module instanceof Module) {
            if ($this->module->useAppViewPath) {
                return '@app/views/' . $this->module->id . '/' . $this->id;
            } elseif (is_array($this->module->viewMap)) {
                $currentAction = $this->id . '/' . ($this->action ? $this->action->id : $this->defaultAction);
                foreach ($this->module->viewMap as $action => $viewPath) {

                    // Special case for map all views of controller
                    if ($action === '*') {
                        return $viewPath . '/' . $this->id;
                    } elseif (fnmatch($action, $currentAction)) {
                        return $viewPath;
                    }
                }
            }
        }

        return parent::getViewPath();
    }
public function getViewPath()
    {
        if ($this->module instanceof Module) {
            if ($this->module->useAppViewPath) {
                return '@app/views/' . $this->module->id . '/' . $this->id;
            } elseif (is_array($this->module->viewMap)) {
                $currentAction = $this->id . '/' . ($this->action ? $this->action->id : $this->defaultAction);
                foreach ($this->module->viewMap as $action => $viewPath) {

                    // Special case for map all views of controller
                    if ($action === '*') {
                        return $viewPath . '/' . $this->id;
                    } elseif (fnmatch($action, $currentAction)) {
                        return $viewPath;
                    }
                }
            }
        }

        return parent::getViewPath();
    }
public function getViewPath ( ) { if ( $ this -> module instanceof Module ) { if ( $ this -> module -> useAppViewPath ) { return '@app/views/' . $ this -> module -> id . '/' . $ this -> id ; } elseif ( is_array ( $ this -> module -> viewMap ) ) { $ currentAction = $ this -> id . '/' . ( $ this -> action ? $ this -> action -> id : $ this -> defaultAction ) ; foreach ( $ this -> module -> viewMap as $ action => $ viewPath ) { // Special case for map all views of controller if ( $ action === '*' ) { return $ viewPath . '/' . $ this -> id ; } elseif ( fnmatch ( $ action , $ currentAction ) ) { return $ viewPath ; } } } } return parent :: getViewPath ( ) ; }
Override the default Yii controller getViewPath method. To define the template folders in where
the templates are located. Why? Basically some modules needs to put theyr templates inside of the client
repository.

@return string
Override the default Yii controller getViewPath method . To define the template folders in where the templates are located . Why? Basically some modules needs to put theyr templates inside of the client repository .