]> _ Git - cubeextranet.git/commitdiff
wait #3489 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 16 Mar 2020 16:31:20 +0000 (16:31 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 16 Mar 2020 16:31:20 +0000 (16:31 +0000)
inc/ws/Util/html5/master/class.ws.html5.seo.php

index 1963b08f96f7e39f49d9da076c5a95ae5a497238..de9a7caab2c774c5eee81e71db183118df674991 100644 (file)
@@ -170,10 +170,20 @@ class wsHTML5SeoPage
     {\r
         $html = $this->_container->html;\r
 \r
+        if (!$this->canonical) {\r
+            $this->canonical = $this->getURL();\r
+        }\r
+        if (!$this->next && isset($this->_container->pages[$this->page + 1])) {\r
+            $this->next = $this->_container->pages[$this->page + 1]->getURL();\r
+        }\r
+        if (!$this->prev && isset($this->_container->pages[$this->page - 1])) {\r
+            $this->prev = $this->_container->pages[$this->page - 1]->getURL();\r
+        }\r
+\r
         $vars = ['description' => $this->description ? '<meta name="description" content="' . $this->description . '">' : '',\r
             'keywords' => $this->keywords ? '<meta name="keywords" content="' . $this->keywords . '">' : '',\r
             'titre' => $this->title,\r
-            'canonical' => $this->canonical ? '<link rel="canonical" href="' . $this->canonical . '">' : '',\r
+            'canonical' => $this->canonical ? '<link rel="canonical" href="' . $this->canonical . '">' : '<link rel="canonical" href="' . $this->getURL() . '">',\r
             'prev' => $this->prev ? '<meta name="prev" href="' . $this->prev . '">' : '',\r
             'next' => $this->next ? '<meta name="next" href="' . $this->next . '">' : '',\r
             'robots' => $this->robots ? '<meta name="robots" content="' . $this->robots . '">' : '',\r