lasseboy Posted March 21, 2013 Share Posted March 21, 2013 I want my sub category to always be open. Look pictures.. My english is so bad i cant explain. Pic with - in category is how i want it to be always open. Link to comment Share on other sites More sharing options...
vekia Posted March 21, 2013 Share Posted March 21, 2013 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) 1 Link to comment Share on other sites More sharing options...
lasseboy Posted March 21, 2013 Author Share Posted March 21, 2013 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 More sharing options...
vekia Posted March 21, 2013 Share Posted March 21, 2013 and what about branches tpl file? Link to comment Share on other sites More sharing options...
lasseboy Posted March 21, 2013 Author Share Posted March 21, 2013 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 More sharing options...
lasseboy Posted March 21, 2013 Author Share Posted March 21, 2013 Cant finf any branches.tpl Link to comment Share on other sites More sharing options...
Recommended Posts