hitomiie Posted September 27, 2012 Share Posted September 27, 2012 (edited) Hi everybody! I've used the Category Block, with only first level showed, as an horizontal menu. But there's a little problem: My last level (last category) doesn't get "active" (no class="selected" added). See picture below to understand it better: second level = OK third & last level = NOT OK Is something to change/adapt in category-tree-branch.tpl ? Prestashop 1.4.8.3 Thank you for your help! Edited November 26, 2012 by hitomiie (see edit history) Link to comment Share on other sites More sharing options...
CartExpert.net Posted October 1, 2012 Share Posted October 1, 2012 Hi. Please post your site's url. Regards. Robin. The CartExpert Team Link to comment Share on other sites More sharing options...
hitomiie Posted October 1, 2012 Author Share Posted October 1, 2012 Sorry i can't, it's not released yet. Link to comment Share on other sites More sharing options...
CartExpert.net Posted October 1, 2012 Share Posted October 1, 2012 Sorry, can't help you otherwise. An image does not give enough information. Regards. Robin. The CartExpert Team Link to comment Share on other sites More sharing options...
hitomiie Posted October 3, 2012 Author Share Posted October 3, 2012 (edited) would it help with some bits of source code ? The category that sould be highlighted (active category): <!-- Block categories module --> <div id="categories_block_left" class="block"> <h4>Categories</h4> <div class="block_content"> <ul class="tree "> .... <li class="last"> <a href="/fr/4-blessure" title="">Blessure</a></li></ul> (=> the <li> should have a class="selected" added...) i thought that having: <a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|strip_tags:false|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a> in category-tree-branch.tpl would be enough but apparently not! Edited October 3, 2012 by luisaimp (see edit history) Link to comment Share on other sites More sharing options...
CartExpert.net Posted October 3, 2012 Share Posted October 3, 2012 Sorry, this doesn't help either. Regards. Robin. The CartExpert Team Link to comment Share on other sites More sharing options...
hitomiie Posted October 3, 2012 Author Share Posted October 3, 2012 (edited) well, sorry i know you trying to help but...what do you want to check ? Do you want the .tpl files, some source code,.. ? Should i create more understandable screen caps? if you could navigate on the website, what would you check first to understand my problem? I'm really sorry i can't give any link, my client won't allow it. Edited October 3, 2012 by luisaimp (see edit history) Link to comment Share on other sites More sharing options...
CartExpert.net Posted October 3, 2012 Share Posted October 3, 2012 The CSS first of all, TPL files. Regards. Robin. The CartExpert Team Link to comment Share on other sites More sharing options...
hitomiie Posted October 4, 2012 Author Share Posted October 4, 2012 (edited) Thanks for your answer. I guess the .tpl is category-tree-branch.tpl? Here's the code: <li {if isset($last) && $last == 'true'}class="last"{/if}> <a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|strip_tags:false|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a> {if $node.children|@count > 0} <ul> {foreach from=$node.children item=child name=categoryTreeBranch} {if isset($smarty.foreach.categoryTreeBranch) && $smarty.foreach.categoryTreeBranch.last} {include file="$branche_tpl_path" node=$child last='true'} {else} {include file="$branche_tpl_path" node=$child last='false'} {/if} {/foreach} </ul> {/if} </li> i guess this bit should be changed to add a class="selected" to highlight my first category level when i'm inside it's third level? ($node.id == $currentCategoryId)}class="selected"{/if} what i'm trying to achieve: add a .selected in the third level, right now it's only added to the first and second level. I would like to get that kind of markup: <ul class="tree "> <li><a title="" href="/fr/2-produit">Produit</a></li> <li><a title="" href="/fr/2-sport">Sport</a></li> <li><a title="" href="/fr/2-blessure" class="selected"> Blessure = First level category</a> <ul> <li><a href="" class="selected"> Second Level category</a> <ul> <li><a href="" class="selected"> Third Level category</a> </ul> </li> </ul> </li> Edited October 4, 2012 by hitomiie (see edit history) Link to comment Share on other sites More sharing options...
hitomiie Posted October 13, 2012 Author Share Posted October 13, 2012 "up", anyone have any clue on how i could solve this problem? Thank you Link to comment Share on other sites More sharing options...
hitomiie Posted November 26, 2012 Author Share Posted November 26, 2012 @ The CartExpert Team: here's an exemple online: http://sporthomed.ch/30-autres main navigation: category product "Produits" is not highlighted (it should be pink) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now