Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ENHANCEMENT Adding page ID as metadata in SiteTree->MetaTags() in ord…

…er to provide context for CMS preview of pages
  • Loading branch information...
commit 8fe9283181436a0b8bc1cf70874f36f89207cbf0 1 parent 51ba790
Ingo Schommer chillu authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  code/model/SiteTree.php
2  code/model/SiteTree.php
View
@@ -1269,6 +1269,8 @@ public function MetaTags($includeTitle = true) {
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);
Please sign in to comment.
Something went wrong with that request. Please try again.