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