Jump to content

Trying to modify the Categories block


Recommended Posts

Hi all

 

What I'm trying to do is modify the categories block so that it would show the categories, with 4 most recent products under each category.

The default view is categories, with sub-categories under it.

 

Can someone please help me with the code to get the 4 most recent items under each cat?

 

Here's the code from category-tree-branch.tpl: (where i have removed the code to get the sub-categories, as I'm not interested in that)

 

<li {if isset($last) && $last == 'true'}class="last"{/if}>
<a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a>
{if $node.children|@count > 0}
 <ul>
[GET PRODUCTS CODE GOES HERE]
 </ul>
{/if}
</li>

Link to comment
Share on other sites

×
×
  • Create New...