inabeathead Posted January 29, 2013 Share Posted January 29, 2013 (edited) Hello all, I've looked for days on forums to find an answer to this question, found posts with same question but never with an effective answer. I'm using the sfHoverForce class in the blockTopmenu module to apply a specific color to the active page category in my top menu. The problem is when the current page is a sub-category, the color is applied to the sub-category and not the Parent category... I would like both parent and sub-category to be considered selected in order to have the sfHoverForce class applied to both of them... I suppose it's got to do with this line in the blockTopMenu.php : $children = Category::getChildren((int)$id_category, (int)$id_lang, true, (int)$id_shop); $selected = ($this->page_name == 'category' && ((int)Tools::getValue('id_category') == $id_category)) ? ' class="sfHoverForce"' : ''; Is there a way to extend the selected state to both active category and parent category ? In advance thank you for your help, I'm stuck ... Olivier Edited February 7, 2013 by inabeathead (see edit history) Link to comment Share on other sites More sharing options...
inabeathead Posted January 30, 2013 Author Share Posted January 30, 2013 anyone ? I need your help Link to comment Share on other sites More sharing options...
OPS Posted February 7, 2013 Share Posted February 7, 2013 I hope this post can help you http://nemops.com/prestashop-top-menu-current-state/ Best regards, Link to comment Share on other sites More sharing options...
inabeathead Posted February 7, 2013 Author Share Posted February 7, 2013 Perfect !!! Thank you so much fot that link, it solved it all ! Best regards, Olivier G Link to comment Share on other sites More sharing options...
Recommended Posts