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

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