setViewsDir multiple folders

Hello.

I am trying to setup multiple folders for views. I manage to make it happend by doing this:

        $this->view->setViewsDir(array('folder', 'subFolder'));

However, when i then use setMainView it generates twice?

edited Feb '19

you can define the views directory inside the function onConstruct() on each controller

    public function onConstruct()
    {
        $this->view->setViewsDir($this->config->get('paths')->get("app") . DS .'Views/subdirectory');
    }