_helper->layout()->disableLayout(); $this->view->menuRenderer = new MenuRenderer( Menu::load(), Url::fromRequest()->without('renderLayout')->getRelativeUrl() ); } /** * Render the top bar */ public function topbarAction() { $topbarHtmlParts = array(); /** @var Hook\Layout\TopBar $hook */ $hook = null; foreach (Hook::all('TopBar') as $hook) { $topbarHtmlParts[] = $hook->getHtml($this->getRequest(), $this->view); } $this->view->topbarHtmlParts = $topbarHtmlParts; $this->renderScript('parts/topbar.phtml'); } }