Jump to content

Trying to modify a template's menu


Yossefelbaz

Recommended Posts

Hi.

 

I am a new member, so maybe i am asking the wrong question in the wrong place... ;)

 

The template we have comes with left menu. This menu always open, categories listed with subcategories all the way down. (see it at dressmeupny.com) I am trying now to make it accordion like menu. I have the code and it is working (i took it off for now because of the issue).

 

The issue i have is this script: (category-tree-branch.tpl)

<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|truncate:30:'...'|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>

 

When i am changing the first anchor (<a ...></a>) part to <A href="#"> it changing all the links to this, and i want it to affect only the category link not the subcategories. So i am looking to understand how to check if it's a category or subcategory. I tried to get idea what is the element of the $node root but i couldn't. Like if i could get if it's $node.first or not, etc...

 

Thanks in advance.

Edited by Yossefelbaz (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...