mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
2beda6645a
commit
5308e76142
@ -362,12 +362,12 @@ class SiteTree extends DataObject {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the title, description and keywords metatags.
|
* 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
|
* @return string The XHTML metatags
|
||||||
*/
|
*/
|
||||||
public function MetaTags($includeTitle = true) {
|
public function MetaTags($includeTitle = true) {
|
||||||
$tags = "";
|
$tags = "";
|
||||||
if($includeTitle == true) {
|
if($includeTitle == true || $includeTitle == 'true') {
|
||||||
$tags .= "<title>" . Convert::raw2xml($this->MetaTitle ? $this->MetaTitle : $this->Title) . "</title>\n";
|
$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";
|
$tags .= "<meta name=\"generator\" http-equiv=\"generator\" content=\"SilverStripe 2.0 - http://www.silverstripe.com\" />\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user