Disable route persistence for static menus

This commit is contained in:
Samuel Georges 2015-03-25 19:34:09 +11:00
parent 44b037c21c
commit 15a016a338
1 changed files with 3 additions and 5 deletions

View File

@ -114,10 +114,7 @@ class Page extends CmsCompoundObject
* assuming that the method is called not during the front-end
* request processing.
*/
$controller = Controller::getController();
if (!$controller) {
$controller = new Controller;
}
$controller = Controller::getController() ?: new Controller;
return $controller->pageUrl($page, $params, true);
}
@ -188,7 +185,8 @@ class Page extends CmsCompoundObject
}
$page = self::loadCached($theme, $item->reference);
$pageUrl = self::url($item->reference);
$controller = Controller::getController() ?: new Controller;
$pageUrl = $controller->pageUrl($item->reference, [], false);
$result = [];
$result['url'] = $pageUrl;