Hi all,
I have the 'products' module which seems to be what I need.
I thought one of the default templates would simply be a list of the products, with the categories as headings - each listed product links to a detail page, but none of the templates seem to do this. Can anyone give me an idea how to amend the template for this, I'm sure its really simple!
Do I need to use the hierarchy?
Please help!
Thanks
[solved] Products - list products with categories as headings?
-
- Forum Members
- Posts: 20
- Joined: Sat May 15, 2010 9:54 am
[solved] Products - list products with categories as headings?
Last edited by mrchristoph on Tue Sep 14, 2010 8:30 pm, edited 1 time in total.
-
- Forum Members
- Posts: 20
- Joined: Sat May 15, 2010 9:54 am
-
- Forum Members
- Posts: 20
- Joined: Sat May 15, 2010 9:54 am
Re: Products - list products with categories as headings?
If anyone at all is interested I seem to have reached a solution, but I'm suprised it worked, and I'm happy for other suggestions. In the hierarchy template I've called the Products module within it using the the summary template, using $item.name as the variable for hierarchy item:
Thanks yet again for all your invaluable advice - I couldn't have done it without you 
Code: Select all
{foreach from=$hierdata key='key' item='item'}
{strip}
<li {if isset($active_hierarchy) and $item.id == $active_hierarchy} class="active"{/if}>
{if $item.count gt 0}
<a href="{$item.url}">{$item.name} ({$item.count})</a>
{else}
{$item.name} ({$item.count})
{/if}
{/strip}
{Products action="default" hierarchy=$item.name summarytemplate="cake-summ"}
</li>
{/foreach}
