075 optimisation méta d'un article de blog

This commit is contained in:
Fred Tempez 2020-04-28 15:06:49 +02:00
parent e1e625b361
commit 3c45d77023

View File

@ -36,7 +36,7 @@ class common {
const THUMBS_WIDTH = 640; const THUMBS_WIDTH = 640;
// Numéro de version // Numéro de version
const ZWII_VERSION = '10.0.073'; const ZWII_VERSION = '10.0.075';
const ZWII_UPDATE_CHANNEL = "v10"; const ZWII_UPDATE_CHANNEL = "v10";
public static $actions = []; public static $actions = [];
@ -1541,7 +1541,10 @@ class core extends common {
$moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']); $moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']);
$this->addOutput([ $this->addOutput([
'title' => $title, 'title' => $title,
'metaDescription' => $this->getData(['page', $this->getUrl(0), 'metaDescription']), // 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)
: $this->getData(['page', $this->getUrl(0), 'metaDescription']),
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']), 'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']), 'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']), 'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),