Disable route persistence for static menus
This commit is contained in:
parent
44b037c21c
commit
15a016a338
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue