Jump to content

I want my sub category to always be open.


Recommended Posts

you should edit blockcategories.tpl/ branches file of blockcategories module.

you must change display:none; for display:block; but only for first category position (you can create if condition based on foreach loop or on category id)

  • Like 1
Link to comment
Share on other sites

This is only code in blockcategories.tpl :

 

 

<!-- Block categories module -->

<div id="categories_block_left" class="block">

<p class="title_block">{l s='Categories' mod='blockcategories'}</p>

<div class="block_content">

<ul class="tree {if $isDhtml}dhtml{/if}">

{foreach from=$blockCategTree.children item=child name=blockCategTree}

{if $smarty.foreach.blockCategTree.last}

{include file="$branche_tpl_path" node=$child last='true'}

{else}

{include file="$branche_tpl_path" node=$child}

{/if}

{/foreach}

</ul>

{* Javascript moved here to fix bug #PSCFI-151 *}

<script type="text/javascript">

// <![CDATA[

// we hide the tree only if JavaScript is activated

$('div#categories_block_left ul.dhtml').hide();

// ]]>

</script>

</div>

</div>

<!-- /Block categories module -->

Link to comment
Share on other sites

You meen category-tree-branch.tpl ?

:

 

 

<li {if isset($last) && $last == 'true'}class="last"{/if}>

<a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a>

{if $node.children|@count > 0}

<ul>

{foreach from=$node.children item=child name=categoryTreeBranch}

{if $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>

Link to comment
Share on other sites

×
×
  • Create New...