<{if (!isset($type_id) || $type_id=='') && isset($custom_str) && $custom_str != ''}> <{* 根据栏目的自定义属性来获取栏目ID *}> <{assign var="type_id" value=""}> <{foreach name=all_type item=single_type from=$web.type}> <{if $type_id == '' && $single_type.custom_str|strstr:$custom_str }> <{assign var="type_id" value="`$single_type.id`"}> <{/if}> <{/foreach}> <{/if}> <{if !isset($type_id) || $type_id == '' }> <{if isset($data_ary.type_info.id) }> <{assign var="type_id" value="`$data_ary.type_info.id`"}> <{* 如果没有下级栏目，则显示同级栏目 *}> <{if isset($show_parent_type) && $show_parent_type == 1 && $web.type[$type_id].parent_id > 0 }> <{assign var="has_sub_type" value="0"}> <{foreach name=has_sub_type item=item_info from=$web.type}> <{if $item_info.parent_id == $type_id }> <{assign var="has_sub_type" value="1"}> <{/if}> <{/foreach}> <{if $has_sub_type == '0' }> <{assign var="type_id" value="`$web.type[$type_id].parent_id`"}> <{/if}> <{/if}> <{else}> <{if isset($custom_str) && $custom_str != '' }> 将栏目自定义属性设置为 <{$custom_str}>，此处将显示它的下级栏目 <{else}> 请设置正确的栏目ID <{/if}> <{/if}> <{/if}> <{if !isset($item_num) }> <{assign var="item_num" value="100"}> <{/if}> <{if !isset($show_sub_type) }> <{assign var="show_sub_type" value="0"}> <{/if}> <{if !isset($item_title) || $item_title == 'itself' }> <{if $web.type[$type_id].icon_url == '' }> <{assign var="item_title" value="`$web.type[$type_id].title`"}> <{else}> <{assign var="item_title" value=""}> <{/if}> <{/if}> <{* 显示下级栏目 *}> <{assign var="real_item_num" value="0"}> <{foreach name=sub_type item=item_info from=$web.type}> <{if $item_info.parent_id == $type_id && $real_item_num < $item_num }> <{if $real_item_num==0 }>

<{$item_title|default:'下级分类'}>
  <{/if}> <{if isset($data_ary.type_info.id) && $data_ary.type_info.id == $item_info.id }> <{assign var="item_class" value="current"}> <{else}> <{assign var="item_class" value=""}> <{/if}> <{assign var="real_item_num" value="`$real_item_num+1`"}>
  1. <{$item_info.title}> <{if $show_sub_type == 1 }> <{assign var="show_ul" value="no"}> <{foreach name=sub_type_2 item=item_info_2 from=$web.type}> <{if $item_info_2.parent_id == $item_info.id }> <{if $show_ul == 'no' }>
     <{assign var="show_ul" value="yes"}> <{/if}>
     - <{$item_info_2.title}>
     <{/if}> <{/foreach}> <{if $show_ul == 'yes' }>
     <{/if}> <{/if}>
  <{/if}> <{/foreach}> <{if $always_show_title == 'yes' && $real_item_num == 0 }>
  <{$item_title|default:'下级分类'}>
    <{assign var="real_item_num" value="`$real_item_num+1`"}> <{/if}> <{if $real_item_num>0 }> <{if $more_text != '' }>
    1. <{$more_text}>
    <{/if}>
  <{/if}>