<%set DataTable newsList=get_article_list(channel, category_id, pagesize, page, "status=0", out totalcount, out pagelist, "news_list", category_id, "__id__")%><!--取得一个分页DataTable--> <%foreach(DataRow dr in newsList.Rows)%> <dl> <dt class="Dt_img"> <%if({dr[img_url]}!="")%> <a href="<%linkurl(get_url_name(get_category_name({dr[channel_id]}),"detail"),{dr[id]})%>" title=""><img src="{dr[img_url]}" width="180" height=150 alt="{dr[title]}"/></a> <%/if%> </dt> <dd class="Dt_T"><h1><a href="<%linkurl(get_url_name(get_category_name({dr[channel_id]}),"detail"),{dr[id]})%>" title="{dr[title]}">{dr[title]}</a></h1></dd> <dd class="DD_time">时间:{dr[add_time]}</dd> <dd class="DD_tags">标签:<a href="" title="">智能手机</a><a href="" title="">智能手机</a><a href="" title="">智能手机</a></dd> <dd class="DD_des"> <p> {dr[zhaiyao]} </p> </dd> </dl> <%/foreach%>
将get_article_list方法中的"news_list",改为channel+"_list"就可以了
linkurl需要自定义,http://www.cnblogs.com/qigege/p/4952440.html