Merge pull request #879 from sheadawson/833-currentPageID

Add hook for extensions to update current page id, before falling ...
This commit is contained in:
Ingo Schommer 2013-10-21 00:24:06 -07:00
commit c645d76b1f

View File

@ -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();