Hello, in a module controller i changed for a while in the initialize function of the controller for a view object ($di['view']) in its EventsManager for a view level only (VIew::LEVEL_ACTION_VIEW) for beforeRenderView event setViewsDir to my module views dir and then for afterRenderView i changed for the previes, original path for views. But as i noticed (a couple days ago) the change with paths was in place for the next .volt file (i could have noticed it of course only after i had removed temporarily afterRenerView path restoration). There are some functions - get active path or something which show there is going to be used old views path anyway.

Shouldn't it work immediately after i change the directory? I ask this mainly becaouse in the future this can change in some Phalcon version.

I actually found a workaround - in the main boostrap file for the routing service when i beforeMatch event detects some Module route it sets up the views dir and then i restore the original default views dir in the module controller in on beforeRenderView first invokation (or after) and the actual change is delayed until another view action. Maybe it would work on initialize function also but i used the beforeRenderView

Sorry if i was wrong with this post.

As a matter of explanation: My modules will be using some classess and files from main application part not module.