<{if (!isset($type_id) || $type_id=='') && isset($custom_str) && $custom_str != ''}> <{assign var="type_id" value=""}> <{assign var="current_custom_str_num" value="1"}> <{if !isset($custom_str_num) }> <{assign var="custom_str_num" value="1"}> <{/if}> <{foreach name=all_type item=single_type from=$web.type}> <{if ( $single_type.property == 'list' || $single_type.property == 'cover' ) && $single_type.custom_str|strstr:$custom_str }> <{if $custom_str_num == $current_custom_str_num && $type_id == '' }> <{assign var="type_id" value="`$single_type.id`"}> <{/if}> <{assign var="current_custom_str_num" value="`$current_custom_str_num+1`"}> <{/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`"}> <{else}> <{if isset($custom_str) && $custom_str != ''}> 请设置栏目的自定义属性为 <{$custom_str}> <{else}> 请设置正确的栏目ID <{/if}> <{/if}> <{/if}> <{if !isset($article_type) }> <{assign var="article_type" value="new_article"}> <{/if}> <{* 2009-6-15 修改，需要HBcms版本>=1.8 *}> <{if ($data_ary.page_type == 'list' || $data_ary.page_type == 'article') && isset($data_ary[$article_type].0.title) && $data_ary.type_info.id==$type_id }> <{* 列表页，文章页，取当前栏目的缓存数据库 *}> <{assign var="article_data" value="`$data_ary[$article_type]`"}> <{elseif $data_ary.page_type == 'cover' && isset($data_ary[$article_type].0.0.title) && ( $data_ary[$article_type].0.0.type_id == $type_id || $data_ary[$article_type].0.0.type_id_2 == $type_id) }> <{* 封面栏目，取当前封面栏目的缓存数据 *}> <{assign var="article_data" value="`$data_ary[$article_type].0`"}> <{elseif $data_ary.page_type == 'index' && isset($data_ary[$article_type][$type_id]) }> <{* 首页或封面页，取下级栏目的缓存数据 *}> <{assign var="article_data" value="`$data_ary[$article_type][$type_id]`"}> <{else}> <{* 没有可用数据，需要重新载入 *}> <{hbcms_load_data type_id="`$type_id`" article_type="`$article_type`" var="article_data"}> <{* php}> include('config/type_' . $this->_tpl_vars['type_id'] . '.inc.php'); $this->assign('article_data',$TYPE_DATA[$this->_tpl_vars['article_type']]); <{/php *}> <{/if}> <{if !isset($item_num) }> <{assign var="item_num" value="10"}> <{/if}> <{if !isset($item_len) }> <{assign var="item_len" value="18"}> <{/if}> <{if !isset($item_title) }> <{assign var="item_title" value="`$web.type[$type_id].title`"}> <{/if}> <{if !isset($more_text) }> <{assign var="more_text" value="更多..."}> <{/if}> <{if !isset($show_pic) }> <{assign var="show_pic" value="no"}> <{/if}> <{* CSS设计时文字链接用ol控制，图片链接用ul控制 *}> <{strip}>

<{$item_title}>
  <{if $show_pic == 'yes' }>
  <{else}>
  <{/if}> <{assign var="real_item_num" value="1"}> <{foreach name=article_data item=item_info from=$article_data}> <{if $real_item_num <= $item_num}> <{if $show_pic == 'yes' }> <{if $item_info.icon_url != '' }>
  1.   <{$item_info.title|cn_truncate:$item_len:"..":true}>
       <{$more_text}>
  <{assign var="real_item_num" value="`$real_item_num+1`"}> <{/if}> <{else}>
  2. <{if isset($date_format) && $date_format != '' }> <{$item_info.timestamp|date_format:$date_format}> <{/if}><{$real_item_num}><{$item_info.title|cn_truncate:$item_len:"..":true}>
  <{assign var="real_item_num" value="`$real_item_num+1`"}> <{/if}> <{/if}> <{/foreach}> <{if $show_pic == 'yes' }>
  <{else}>
  <{$more_text}>
  <{/if}>

<{/strip}>