mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #879 from sheadawson/833-currentPageID
Add hook for extensions to update current page id, before falling ...
This commit is contained in:
commit
c645d76b1f
@ -790,6 +790,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
public function currentPageID() {
|
||||
$id = parent::currentPageID();
|
||||
|
||||
$this->extend('updateCurrentPageID', $id);
|
||||
|
||||
// Fall back to homepage record
|
||||
if(!$id) {
|
||||
$homepageSegment = RootURLController::get_homepage_link();
|
||||
|
Loading…
Reference in New Issue
Block a user