Other question to same topic [solved]Product's hierarcy and summary
Posted: Thu Oct 14, 2010 6:27 pm
Hi,
I know basics from html, css and smartytags (can build ugly site)... I have a problem with product module. I dont understand how modules' hierarcy and summary works. How I can add styles for hierarcy tree or change the looks of summary page?
I would be very thankful if someone help me to start...
Hierarcy's sample template looks like this and it only gives hierarcy tree.
{* hierarchy report template *}
{if !isset($hdepth) && isset($hierarchy_item)}
Hierarchy Data for {$hierarchy_item.name} ({$hierarchy_item.id})
{/if}
{if !isset($hdepth)}{assign var='hdepth' value='0'}{/if}
{*
// create a nested set of unordered lists
// if the active_hierarchy smarty variable exists
// and matches the current hierarchy id
// the active class will be given
// to the ul. You may want to modify your summary template
// to set this variable
*}
{foreach from=$hierdata key='key' item='item'}
{strip}
{if $item.count gt 0}
{$item.name} ({$item.count})
{else}
{$item.name} ({$item.count})
{/if}
{if isset($item.children) }
{* there are children call this template again *}
{include file=$smarty.template hierdata=$item.children hdepth=$hdepth+1}
{/if}
{/strip}
{/foreach}
-Recon
I know basics from html, css and smartytags (can build ugly site)... I have a problem with product module. I dont understand how modules' hierarcy and summary works. How I can add styles for hierarcy tree or change the looks of summary page?
I would be very thankful if someone help me to start...
Hierarcy's sample template looks like this and it only gives hierarcy tree.
{* hierarchy report template *}
{if !isset($hdepth) && isset($hierarchy_item)}
Hierarchy Data for {$hierarchy_item.name} ({$hierarchy_item.id})
{/if}
{if !isset($hdepth)}{assign var='hdepth' value='0'}{/if}
{*
// create a nested set of unordered lists
// if the active_hierarchy smarty variable exists
// and matches the current hierarchy id
// the active class will be given
// to the ul. You may want to modify your summary template
// to set this variable
*}
{foreach from=$hierdata key='key' item='item'}
{strip}
{if $item.count gt 0}
{$item.name} ({$item.count})
{else}
{$item.name} ({$item.count})
{/if}
{if isset($item.children) }
{* there are children call this template again *}
{include file=$smarty.template hierdata=$item.children hdepth=$hdepth+1}
{/if}
{/strip}
{/foreach}
-Recon