kamiliok Posted April 25, 2014 Share Posted April 25, 2014 Hello! I am modifying top menu submenu (2 level). Can somebody please help me to move <li id="category-thumbnail">...</li> up to be the first item on list not last? Thanks! Link to comment Share on other sites More sharing options...
vekia Posted April 26, 2014 Share Posted April 26, 2014 what module version you use? Link to comment Share on other sites More sharing options...
vekia Posted April 26, 2014 Share Posted April 26, 2014 ok i analysed several versions of this menu module, everything look the same for each of the version. so, to achieve it basically open module file named blocktopmenu.php there is a code like: $html .= $this->generateCategoriesMenu($category['children']); if ((int)$category['level_depth'] == 2) { $files = scandir(_PS_CAT_IMG_DIR_); if (count($files) > 0) { $html .= '<li id="category-thumbnail">'; foreach ($files as $file) if (preg_match('/'.$category['id_category'].'-([0-9])?_thumb.jpg/i', $file) === 1) $html .= '<div><img src="'.$this->context->link->getMediaLink(_THEME_CAT_DIR_.$file) .'" alt="'.Tools::SafeOutput($category['name']).'" title="' .Tools::SafeOutput($category['name']).'" class="imgm" /></div>'; $html .= '</li>'; } } change it to: if ((int)$category['level_depth'] == 2) { $files = scandir(_PS_CAT_IMG_DIR_); if (count($files) > 0) { $html .= '<li id="category-thumbnail">'; foreach ($files as $file) if (preg_match('/'.$category['id_category'].'-([0-9])?_thumb.jpg/i', $file) === 1) $html .= '<div><img src="'.$this->context->link->getMediaLink(_THEME_CAT_DIR_.$file) .'" alt="'.Tools::SafeOutput($category['name']).'" title="' .Tools::SafeOutput($category['name']).'" class="imgm" /></div>'; $html .= '</li>'; } } $html .= $this->generateCategoriesMenu($category['children']); 1 Link to comment Share on other sites More sharing options...
kamiliok Posted April 26, 2014 Author Share Posted April 26, 2014 Vekia thank you very much!!! Worked like a charm! Now with some css i can float submenu list left and make vertical image float right. Beautiful! Thanks again! Link to comment Share on other sites More sharing options...
vekia Posted April 26, 2014 Share Posted April 26, 2014 you're welcome glad to hear that i could help you a litte. i marked topic title as solved. with regards, Milos 1 Link to comment Share on other sites More sharing options...
Recommended Posts