This is what I am trying to do:
views module1 controller1 action1.tpl controller2 action2.tpl index.tpl module2 controller1 action1.tpl controller2 action2.tpl index.tpl
I want module2 to get the index.tpl from the parent directory automatically. But I cannot do that when I am writing:
public function registerServices($di) {
// dispatcher here
$view = $di->get('view');
$view->setViewsDir(realpath($view->getViewsDir().'/module2'));
$di->set('view',$view);
}
because this way, the views directory root is changed to module2 and now it has no idea about the parent. What can I do to achieve that and have a unified layout throughout the application if the module doesn't have its own layout.