Happy Christmas!
I have a question regarding the Products module with the following hierarchy as a menu:
- Women
-- Clothing
--- Jeans
--- Sweater
- Men
-- Clothing
--- Jeans
--- Sweater
At the position where I want my menu i put following tag:
Code: Select all
{Products action="hierarchy" hierarchytemplate="Products Menu"}
Code: Select all
{if !isset($hdepth) && isset($hierarchy_item)}
<h1>{$hierarchy_item.name}</h1>
{/if}
{if !isset($hdepth)}{assign var='hdepth' value='0'}{/if}
<ul {if $hdepth == 0}id="products_hierarchy"{/if} class="products_hierarchy_level{$hdepth}">
{foreach from=$hierdata key='key' item='item'}
{strip}
{$class='product_hier'}
{if isset($active_hierarchy) and $item.id == $active_hierarchy}{$class=$class|cat:' active'}{/if}
{if isset($item.children)}{$class=$class|cat:' parent'}{/if}
<li{if $class != ''} class="{$class}"{/if}>
{if isset($item.children)}
<a href="{$item.down_url}">{$item.name}</a>
{include file=$smarty.template hierdata=$item.children hdepth=$hdepth+1}
{else}
<a href="{$item.url}">{$item.name}</a>
{/if}
{if $nochildren}
{/if}
</li>
{/strip}
{/foreach}
</ul>
How do I get to show all jeans and sweater when I click on clothing?
The ul part of hierarchytemplate="Products Menu" is only shown in my template where I want my menu, which is great. The whole code is shown in the content part of the website.
Second question:
How is it defined that only the ul is shown in the menu and the whole code shown in the content part?
Thanks in advance!
Joep