Jump to content

Remove subcategories from category block


Recommended Posts

Hello!

 

I hope you could help. I duplicated the categories block, and I want to show just the parent categories in one of them, and in the other display only the subcategories. Is there something in the tpl files I need to remove in ordet to do this?

 

I can't do that in the BO, because if I change the level of the categories, then my subcategories wouldn't show in the duplicated block.

 

Thank you

Link to comment
Share on other sites

edit the category-tree-branch.tpl in modules/blockcategories

 

and remove

 

 

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

 

 

 

This dont show child categories

Link to comment
Share on other sites

×
×
  • Create New...