<{assign var=search_category value=$category.id}> <{if !$categories[$search_category].son && $search_category!=0}> <{assign var=search_category value=$categories[$search_category].parent_id}> <{/if}>

### <{if $search_category}><{$categories[$search_category].base_name}><{else}><{$lang.shop_by_category}><{/if}>

<{foreach from=$categories item=list name=category_list key=key}> <{if $list.parent_id == $search_category}>
- class="sun_cur"<{/if}>><{$list.base_name}> <{if $categories[$list.id].son}>
  <{foreach from=$categories item=sublist name=category_list key=key}> <{if $sublist.parent_id == $list.id}>
  - class="sun_cur"<{/if}>><{$sublist.base_name}>
  <{/if}> <{/foreach}>
  <{/if}>
<{/if}> <{/foreach}>