//函数:get_tpl_list_nav($tpl_id='',$is_content=0)
//功能:根据模板ID或当前栏目ID获得子栏目列表页
{assign source=get_tpl_list_nav('3',1) name=tree/}
{if $tree}
<div class="box left_width">
<div class="left_title"><h2>产品导航</h2></div>
<div class="box_in">
<div id="category_tree">
{loop source=$tree item=$nav}
<dl>
<dt><span class="c_icon"></span><a class="{print $nav['class']/}" href="{print $nav['url']/}" {print $nav['target']/} title="{print $nav['cate_name']/}">{print $nav['cate_name']/}({print $nav['content_num']/})</a></dt>
<dd style="display: none;" id="nav_16">
<ul>
{loop source=$nav['child']}
<li><a class="{print $v['class']/}" href="{print $v['url']/}">{print $v['cate_name']/}({print $v['content_num']/})</a></li>
{/loop}
</ul>
</dd>
</dl>
{/loop}
</div><!--分页导航-->
</div>
</div><!--容器结束-->
{/if}
//函数:get_else_content($cate_id='',$limit='0,5',$order_type='id',$filter='',$pic='no',$order='desc',$lang='',$like=0)
//功能:获得其它内容【列表页和内容页自动获取】
{assign source=get_else_content($cate_id='',$limit='0,5',$order_type='hits',$filter='',$pic='no',$order='desc',$lang='') name=hot_arc/}
{if $hot_arc}
<div class="box">
<div class="left_title"><h2>热门内容</h2></div>
<div class="box_in">
<div class="news_list">
<ul>
{loop source=$hot_arc}
<li><a title="{print $v['title']/}" href="{print $v['url']/}" {print $v['target']/} {if $v['style']}style="{print $v['style']/}"{/if}>{print cn_substr($v['title'],40)/}</a>{print date('m-d',$v['updatetime'])/}</li>
{/loop}
</ul>
</div>
</div>
</div>
/*
* 获得片段内容,通过标识获取
*/
function get_block_content($block=''){
if(empty($block)){return;}
$sql="select content from ".DB_PRE."block where tag = '".$block."' and lang='".$GLOBALS['lang']."'";
$rel = $GLOBALS['mysql']->fetch_asc($sql);
return $rel[0]['content'];
}
//函数:list_article()
//功能:获得列表页内容列表【只能在列表页使用】
{loop source=list_article()}
<li><span class="time">{print date('Y-m-d H:m:s',$v['updatetime'])/}</span><a href="{print $v['url']/}" {print $v['target']/} style="{print $v['style']/}">{print $v['title']/}</a></li>
{/loop}