Jump to content

Dividing blockcategories


Recommended Posts

Hi all!

 

I would like to split my categories to two groups (in one categoriesblock) to group my categories.

 

One group would be accessories and the other one furnitures. Please see the attached file for exact explanation:)

 

Is it possible?

Best regards

letrof

post-230236-0-22006200-1363262388_thumb.jpg

Link to comment
Share on other sites

Hi all!

 

I would like to split my categories to two groups (in one categoriesblock) to group my categories.

 

One group would be accessories and the other one furnitures. Please see the attached file for exact explanation:)

 

Is it possible?

Best regards

letrof

 

you should edit blockcategories.tpl file and make simple {if} condition, by this i mean something like if id == id of this category (Meble Belldeco) then add <div>Header title</div>

i hope that this is clear - if not we can try in polish language ;)

Link to comment
Share on other sites

Its a pain to do, but you can do it by editing the structure of the categories and editing the css to make top level categories look like the block heading.

 

but it would make all of the top categories look like the block heading and I just want one "separator".

Link to comment
Share on other sites

Right, what you would to is to make two top categories and everything else a sub category of them.

But then I would have to change all categories and that is a SEO disaster...

Is there any other way to insert a text between? It doesn't have to be link - just a text or even a picture?

Link to comment
Share on other sites

you should edit blockcategories.tpl file and make simple {if} condition, by this i mean something like if id == id of this category (Meble Belldeco) then add <div>Header title</div>

i hope that this is clear - if not we can try in polish language ;)

Can you please explain the {if} condition and where exactly put this code?

my blockategories.tpl is now:

<!-- Block categories module -->
<div id="categories_block_left" class="block">
<h4><a href="{$blockCategTree.link}">{l s='Categories' mod='blockcategories'}</a></h4>
<div class="block_content">
 <ul class="tree {if $isDhtml}dhtml{/if}">
 {* 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>
 {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>
</div>
</div>
<!-- /Block categories module -->

Link to comment
Share on other sites

  • 1 year later...

Can you please explain the {if} condition and where exactly put this code?

my blockategories.tpl is now:

<!-- Block categories module -->
<div id="categories_block_left" class="block">
<h4><a href="{$blockCategTree.link}">{l s='Categories' mod='blockcategories'}</a></h4>
<div class="block_content">
  <ul class="tree {if $isDhtml}dhtml{/if}">
  {* 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>
  {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>
</div>
</div>
<!-- /Block categories module -->

Yes, I would also like to know :)

Link to comment
Share on other sites

×
×
  • Create New...