[-] MO : #PSFV-716 - Fix bug with "home link" on module blocktopmenu

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14250 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-03-26 09:51:41 +00:00
parent 9c72708686
commit 2bc5d6190c
+6 -1
View File
@@ -540,6 +540,11 @@ class Blocktopmenu extends Module
{
$id_lang = $id_lang ? $id_lang : Context::getContext()->language->id;
$category = new Category($id_category, $id_lang);
if ($category->level_depth > 1)
$category_link = $category->getLink();
else
$category_link = $this->context->link->getPageLink('index');
if (is_null($category->id))
return;
@@ -547,7 +552,7 @@ class Blocktopmenu extends Module
$childrens = Category::getChildren($id_category, $id_lang);
$selected = ($this->page_name == 'category' && ((int)Tools::getValue('id_category') == $id_category)) ? ' class="sfHoverForce"' : '';
$this->_menu .= '<li '.$selected.'>';
$this->_menu .= '<a href="'.$category->getLink().'">'.$category->name.'</a>';
$this->_menu .= '<a href="'.$category_link.'">'.$category->name.'</a>';
if (count($childrens))
{