protected function _actionRender(Library\CommandContext $context) { $view = $this->getView(); //Set the layout if ($view instanceof Library\ViewTemplate) { $layout = clone $view->getIdentifier(); $layout->name = $view->getLayout(); $alias = clone $layout; $alias->package = 'categories'; $this->getObject('manager')->registerAlias($layout, $alias); } return parent::_actionRender($context); }