075 optimisation méta d'un article de blog

This commit is contained in:
Fred Tempez 2020-04-28 15:09:39 +02:00
parent 3c45d77023
commit fe0e40cb99

View File

@ -1543,7 +1543,7 @@ class core extends common {
'title' => $title,
// Meta description = 160 premiers caractères de l'article
'metaDescription' => $this->getData(['page',$this->getUrl(0),'moduleId']) === 'blog' && !empty($this->getUrl(1))
? substr($this->getData(['module',$this->getUrl(0),$this->getUrl(1),'content']) ,0,159)
? strip_tags(substr($this->getData(['module',$this->getUrl(0),$this->getUrl(1),'content']) ,0,159))
: $this->getData(['page', $this->getUrl(0), 'metaDescription']),
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),