diff --git a/core/core.php b/core/core.php index 9956ceb8..a87fc162 100755 --- a/core/core.php +++ b/core/core.php @@ -36,7 +36,7 @@ class common { const THUMBS_WIDTH = 640; // Numéro de version - const ZWII_VERSION = '10.0.073'; + const ZWII_VERSION = '10.0.075'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = []; @@ -1535,13 +1535,16 @@ class core extends common { } // Importe le module else { - // Id du module, et valeurs en sortie de la page si il s'agit d'un module de page + // Id du module, et valeurs en sortie de la page si il s'agit d'un module de page if($access AND $this->getData(['page', $this->getUrl(0), 'moduleId'])) { $moduleId = $this->getData(['page', $this->getUrl(0), 'moduleId']); $this->addOutput([ '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']), 'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']), 'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']), @@ -2249,8 +2252,8 @@ class layout extends common { * Affiche la meta description */ public function showMetaDescription() { - echo ''; - echo ''; + echo ''; + echo ''; } /**