Change Menu load from config ini files to self provided configuration

refs #6639
This commit is contained in:
Alexander Fuhr 2014-08-22 11:10:17 +02:00
parent 7e0047d00e
commit f757f69bd1
2 changed files with 3 additions and 2 deletions

View File

@ -18,8 +18,9 @@ class LayoutController extends ActionController
*/
public function menuAction()
{
$this->_helper->layout()->disableLayout();
$this->view->menuRenderer = new MenuRenderer(
Menu::fromConfig()->order(), Url::fromRequest()->without('renderLayout')->getRelativeUrl()
Menu::load(), Url::fromRequest()->without('renderLayout')->getRelativeUrl()
);
}

View File

@ -14,5 +14,5 @@ if (! $this->auth()->isAuthenticated()) {
<form action="<?= $this->href('search') ?>" method="get" role="search">
<input type="text" name="q" class="search autofocus" placeholder="<?= $this->translate('Search...') ?>" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
</form>
<?= new MenuRenderer(Menu::fromConfig()->order(), Url::fromRequest()->without('renderLayout')->getRelativeUrl()); ?>
<?= new MenuRenderer(Menu::load(), Url::fromRequest()->without('renderLayout')->getRelativeUrl()); ?>
</div>