From: Vincent Vanwaelscappel Date: Wed, 22 Jul 2020 07:12:18 +0000 (+0200) Subject: wait #3805 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6ae53b356ba056620316917c04f187e9a2e75701;p=pmi.git wait #3805 --- diff --git a/app/Templates/Category.php b/app/Templates/Category.php index 2888cf2..1c18ad4 100644 --- a/app/Templates/Category.php +++ b/app/Templates/Category.php @@ -95,7 +95,10 @@ class Category extends Base continue; } + $product->setLocale('fr'); + $slug_fr=$product->getPageData()->get('slug'); $product->setLocale($menu->getLocale()); + $canonical = $href = $product->getSlugOrTitleAttribute(); if ($root->findOneByHref($canonical) !== null) { continue; @@ -110,6 +113,7 @@ class Category extends Base $detail->setId('product/' . $product->id); $detail->setController(['controller' => 'ProductController', 'action' => 'productDetails', 'params' => ['id' => $product->id]]); $detail->hideInAllMenus(); + $detail->addUrlAliases([$slug_fr]); $menu->addChild($detail); } }