How can I set template from other module in Zend Framework 2? I have two modules:
- module "A" (It's my main theme)
- module "B" (It's kind of plugin/widget)
I would like to in module "A" set template of module "B".
I tried:
public function viewAction()
{
// This is action of controller from module A
$view = new ViewModel();
$widget = new ViewModel(array('article' => $article));
$widget->setTemplate('B/content/article'); // <-- Doens't work
$view->addChild($articleView, 'article');
return $view;
}
But this exmaple doesn't work. So How can I pass identifier of other module to setTemplate() function? Or maybe there is other function/way to set it?
Thanks for any help