Check for string 'true' as well as boolean in MetaTags

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@39532 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-08-01 21:41:09 +00:00
parent 2beda6645a
commit 5308e76142
1 changed files with 2 additions and 2 deletions

View File

@ -362,12 +362,12 @@ class SiteTree extends DataObject {
/**
* Return the title, description and keywords metatags.
* @param boolean $includeTitle Show default <title>-tag, set to false for custom templating
* @param boolean|string $includeTitle Show default <title>-tag, set to false for custom templating
* @return string The XHTML metatags
*/
public function MetaTags($includeTitle = true) {
$tags = "";
if($includeTitle == true) {
if($includeTitle == true || $includeTitle == 'true') {
$tags .= "<title>" . Convert::raw2xml($this->MetaTitle ? $this->MetaTitle : $this->Title) . "</title>\n";
}
$tags .= "<meta name=\"generator\" http-equiv=\"generator\" content=\"SilverStripe 2.0 - http://www.silverstripe.com\" />\n";