From 835574ffe4fbce98c5bb86faa6215288dfd0f7a4 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 16 Sep 2007 16:21:09 +0000 Subject: [PATCH] bfojcapell: Added default use of Translatable and an html metatag with the content language (merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42123 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/SiteTree.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 6459b9c12..12a928bc3 100644 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -171,8 +171,8 @@ class SiteTree extends DataObject { static $extensions = array( "Hierarchy", - "Versioned('Stage', 'Live')", - ); + "Translatable('Title', 'MenuTitle', 'Content', 'URLSegment', 'MetaTitle', 'MetaDescription', 'MetaKeywords', 'Status')", + "Versioned('Stage', 'Live')" ); /** @@ -635,7 +635,7 @@ class SiteTree extends DataObject { /** - * Return the title, description and keywords metatags. + * Return the title, description, keywords and language metatags. * @param boolean|string $includeTitle Show default -tag, set to false for custom templating * * @param boolean $includeTitle Show default <title>-tag, set to false for @@ -664,6 +664,7 @@ class SiteTree extends DataObject { if($this->ExtraMeta) { $tags .= $this->ExtraMeta . "\n"; } + $tags .= "<meta http-equiv=\"Content-Language\" content=\"". Translatable::current_lang() ."\"/>\n"; return $tags; }