language->id; if (!$id_shop) $id_shop = Context::getContext()->shop->id; $url = $this->getBaseLink($id_shop, null, $relative_protocol).$this->getLangLink($id_lang, null, $id_shop); if(!isset(self::$urls_categories_cms[$id_category_cms])) { $link = ManageSeoUrl::getByType($id_category_cms, ManageSeoUrl::TYPE_CATEGORY_CMS, FALSE, $id_lang, $id_shop); self::$urls_categories_cms[$id_category_cms] = $url.$link->link_rewrite; return $url.$link->link_rewrite; } else { return self::$urls_categories_cms[$id_category_cms]; } } public function getPostCmsLink($id_post_cms, $id_lang = null, $id_shop = null, $ipa = 0, $force_routes = false, $relative_protocol = false) { if (!$id_lang) $id_lang = Context::getContext()->language->id; if (!$id_shop) $id_shop = Context::getContext()->shop->id; $url = $this->getBaseLink($id_shop, null, $relative_protocol).$this->getLangLink($id_lang, null, $id_shop); if(!isset(self::$urls_posts_cms[$id_post_cms])) { $link = ManageSeoUrl::getByType($id_post_cms, ManageSeoUrl::TYPE_POST_CMS, FALSE, $id_lang, $id_shop); self::$urls_posts_cms[$id_post_cms] = $url.$link->link_rewrite; return $url.$link->link_rewrite; } else { return self::$urls_posts_cms[$id_post_cms]; } } public function getPostEditoLink($id_post_edito, $id_lang = null, $id_shop = null, $ipa = 0, $force_routes = false, $relative_protocol = false) { if (!$id_lang) $id_lang = Context::getContext()->language->id; if (!$id_shop) $id_shop = Context::getContext()->shop->id; $url = $this->getBaseLink($id_shop, null, $relative_protocol).$this->getLangLink($id_lang, null, $id_shop); if(!isset(self::$urls_editos_cms[$id_post_edito])) { $link = ManageSeoUrl::getByType($id_post_edito, ManageSeoUrl::TYPE_POST_EDITO, FALSE, $id_lang, $id_shop); self::$urls_editos_cms[$id_post_edito] = $url.$link->link_rewrite; return $url.$link->link_rewrite; } else { return self::$urls_editos_cms[$id_post_edito]; } } }