]> _ Git - cubeextranet.git/commitdiff
wip #1799 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 20 Nov 2017 16:32:18 +0000 (16:32 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 20 Nov 2017 16:32:18 +0000 (16:32 +0000)
inc/ws/Util/html5/socialarticles/class.ws.html5.compiler.php
inc/ws/Util/html5/socialarticles/class.ws.html5.links.php

index 7465e3ad7e8d225086180941b09ca96a98519c13..5363ab4c480224776115da97f66b99b9d3fc7adb 100644 (file)
@@ -852,7 +852,7 @@ class wsHTML5Compiler {
        }
 
        public function addSEOArticle($page, $title, $intro, $image) {
-               $this->seoArticles[] = ['title' => $title, 'description' => $intro, 'image' => $image, 'content' => '', 'page' => $page, 'url' => CubeIT_Text::str2URL($title) . '.html'];
+               $this->seoArticles[$title] = ['title' => $title, 'description' => $intro, 'image' => $image, 'content' => '', 'page' => $page, 'url' => CubeIT_Text::str2URL($title) . '.html'];
        }
 
        public function _sortLinks($a, $b) {
@@ -1036,6 +1036,7 @@ class wsHTML5Compiler {
                        }
                }
                $this->config->rasterizePages = cubeArray::parseRange($this->config->rasterizePages);
+               $this->config->seoArticles = $this->seoArticles;
 
                return 'var DATAS=' . json_encode($this->config) . ';' . "\n";
        }
index 86f1633a657db997896b02103b8f3254c568b7d0..a82a41555b8f26525ffa2a0de590b30ad0f6ced3 100644 (file)
@@ -750,12 +750,18 @@ class actionLink extends internalLink {
        }
 
        public function getAdditionnalContent() {
+               $res = parent::getAdditionnalContent();
+               if ($this->extra) {
+                       $res .= ' data-extra="' . $this->extra . '"';
+               }
+
                if (in_array($this->to, $this->_share)) {
-                       return parent::getAdditionnalContent() . ' data-service="' . $this->to . '" ';
+                       $res .= ' data-service="' . $this->to . '" ';
                } else {
-                       return /*parent::getClasses()*/
+                       $res .= /*parent::getClasses()*/
                                ' data-action="' . $this->to . '" ';
                }
+               return $res;
        }
 
        public function getDefaultTooltip() {