<{if (!isset($type_id) || $type_id=='') && isset($custom_str) && $custom_str != ''}> <{assign var="type_id" value=""}> <{foreach name=all_type item=single_type from=$web.type}> <{if ( $single_type.property == 'list' || $single_type.property == 'cover' ) && $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`"}> <{else}> 请设置正确的栏目ID <{/if}> <{/if}> <{if !isset($article_type) }> <{assign var="article_type" value="new_article"}> <{/if}> <{if !isset($title_article_type) }> <{assign var="title_article_type" value="commend_article"}> <{/if}> <{if isset($data_ary[$article_type].0.title) }> <{* 列表页，文章页，取当前栏目的缓存数据库 *}> <{assign var="article_data" value="`$data_ary[$article_type]`"}> <{assign var="title_article_data" value="`$data_ary[$title_article_type]`"}> <{elseif 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`"}> <{assign var="title_article_data" value="`$data_ary[$title_article_type].0`"}> <{elseif isset($data_ary[$article_type][$type_id]) }> <{* 首页或封面页，取下级栏目的缓存数据 *}> <{assign var="article_data" value="`$data_ary[$article_type][$type_id]`"}> <{assign var="title_article_data" value="`$data_ary[$title_article_type][$type_id]`"}> <{else}> <{* 没有可用数据，需要重新载入 *}> <{php}> include('config/type_' . $this->_tpl_vars['type_id'] . '.inc.php'); $this->assign('article_data',$TYPE_DATA[$this->_tpl_vars['article_type']]); $this->assign('title_article_data',$TYPE_DATA[$this->_tpl_vars['title_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}>
  <{assign var="image_article_id" value="0"}> <{if $img_item_num > 0 }> <{foreach name=title_article_data item=item_info from=$title_article_data}> <{if $item_info.icon_url != '' && $img_item_num > 0 }>

  1.   <{$item_info.title|cn_truncate:$item_len:"..":true}>
       <{$item_info.desc|cn_truncate:30:"...":true}>
  <{assign var="image_article_id" value="`$item_info.id`"}> <{assign var="item_num" value="`$item_num-4`"}> <{assign var="img_item_num" value="`$img_item_num-1`"}> <{/if}> <{/foreach}> <{/if}> <{* 当要显示的图片少于2个时候，显示更多的标题文字链接 *}> <{if $img_item_num < 2 }> <{assign var="real_item_num" value="1"}> <{foreach name=article_data item=item_info from=$article_data}> <{if $real_item_num <= $item_num}> <{if $image_article_id == $item_info.id }> <{assign var="item_num" value="`$item_num+1`"}> <{else}>
  2. <{if isset($date_format) && $date_format != '' }> <{$item_info.timestamp|date_format:$date_format}> <{/if}><{$prefix_str|default:$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}>
  <{$more_text}>

<{/strip}>