ENHANCEMENT Adding page ID as metadata in SiteTree->MetaTags() in order to provide context for CMS preview of pages

This commit is contained in:
Ingo Schommer 2011-04-28 22:45:18 +12:00
parent 51ba790f63
commit 8fe9283181

View File

@ -1270,6 +1270,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$tags .= $this->ExtraMeta . "\n";
}
if(Permission::check('CMS_ACCESS_CMSMain')) $tags .= "<meta name='x-page-id' content='{$this->ID}' />\n";
$this->extend('MetaTags', $tags);
return $tags;