enginenr9 Posted January 17, 2011 Share Posted January 17, 2011 Hi!I'm using PS version 1.3.5 with ddsmoothmenu created by Marghoob Suleman ()link hereI've tried, with no success, to highlight the parent category buttons with a ".selected" class (I want that when the user clicks the 3rd level button, that button become selected as well as the related 2nd and 1st levels).I'm using the following code in "category-tree-branch.tpl", which highlights the 3rd level, but not the others: > {if $node.id == $currentCategoryId} class="selected" {elseif $node.id == $currentParentId || $node.id == $currentRootId} class="previousselected"{/if} >{$node.name|escape:htmlall:'UTF-8'} {if $node.children|@count > 0} </pre> <ul> {foreach from=$node.children item=child name=categoryTreeBranch} {if $smarty.foreach.categoryTreeBranch.last} {include file=$tpl_dir./category-tree-branch.tpl node=$child last='true'} {else} {include file=$tpl_dir./category-tree-branch.tpl node=$child last='false'} {/if} {/foreach} </ul> <br> {/if}<br><br Note: I'm higlighting not the "a" tag itself but a "span" inside.I guess the problem is in the second line of this: {if $node.id == $currentCategoryId} class="selected" {elseif $node.id == $currentParentId || $node.id == $currentRootId} class="previousselected"{/if} Can anybody help me with this problem?Thanks. Link to comment Share on other sites More sharing options...
enginenr9 Posted January 17, 2011 Author Share Posted January 17, 2011 Anybody?I'm not being able to find any info on $currentParentId or $currentRootId anywhere.Maybe this also could be done with jquery?Appreciate your help. Link to comment Share on other sites More sharing options...
enginenr9 Posted January 21, 2011 Author Share Posted January 21, 2011 How can I get $currentParentId or $currentRootId to work. Link to comment Share on other sites More sharing options...
frijolita Posted May 17, 2012 Share Posted May 17, 2012 Hi! Did you finally found the solution? those variables seem to be empty ( 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