Jump to content

Disabling Parent category tree links in ps 1.7


Recommended Posts

hi

how to Disabling Parent category tree links in ps 1.7 and my theme ? ! my theme is not a default theme

 

i find this code  in : /modules/ps_categorytree/views/templates/hook
 

{function name="categories" nodes=[] depth=0}
  {strip}
    {if $nodes|count}
      <ul>
        {foreach from=$nodes item=node}
          <li>
            <a href="{$node.link}">{$node.name}</a>
            <div>
              {categories nodes=$node.children depth=$depth+1}
            </div>
          </li>
        {/foreach}
      </ul>
    {/if}
  {/strip}
{/function}

<div class="category-tree">
  <ul>
    <li><a href="{$categories.link nofilter}">{$categories.name}</a></li>
    <li>{categories nodes=$categories.children}</li>
  </ul>
</div>

 

and this code in : themes/mytheme/modules/ps_categorytree/views/templates/hook

 

{function name="categories" nodes=[] depth=0}
  {strip}
    {if $nodes|count}
      <ul>
        {foreach from=$nodes item=node}
          <li data-depth="{$depth}">
              <a href="{$node.link}" title="{$node.name}" data-category-id="{$node.id}"><span>{$node.name}</span></a>
              {if $node.children}
                <div class="collapse-icons" data-toggle="collapse" data-target="#exCollapsingNavbar{$node.id}">
                  <i class="material-icons add">add</i>
                  <i class="material-icons remove">remove</i>
                </div>
                <div class="category-sub-menu collapse" id="exCollapsingNavbar{$node.id}">
                  {categories nodes=$node.children depth=$depth+1}
                </div>
              {/if}
          </li>
        {/foreach}
      </ul>
    {/if}
  {/strip}
{/function}

<div class="left-categories column-block md-bottom">
  <h4 class="column-title">
    {$categories.name}
  </h4>
  <div class="category-tree js-category-tree">
    {categories nodes=$categories.children}
  </div>
</div>

 

i donw know how to change this codes to Disabling Parent category tree links ...

any one can help me ?

 

regars

Link to comment
Share on other sites

  • 6 months later...

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...