Fix #491 no display of canonical URL on some pages

This commit is contained in:
Kijin Sung 2016-05-11 15:15:05 +09:00
parent 9fe37502b8
commit 3fbf94f630
3 changed files with 18 additions and 10 deletions

View file

@ -97,6 +97,12 @@ class Context
* @var array
*/
public $opengraph_metadata = array();
/**
* Canonical URL
* @var string
*/
public $canonical_url = '';
/**
* path of Xpress Engine
@ -2804,7 +2810,7 @@ class Context
*/
public static function setCanonicalURL($url)
{
self::addHtmlHeader(sprintf('<link rel="canonical" href="%s" />', escape($url)));
self::$_instance->canonical_url = escape($url);
}
}
/* End of file Context.class.php */