Artlist标签去掉table

在织梦../include/taglib 文件夹 找到arclist.lib.php 文件

 

然后搜索:

 

if($col>1){ $artlist = “<table width=’$tablewidth’ border=’0′ cellspacing=’0′ cellpadding=’0′> ”; }

修改为:

if($col>1){ $artlist = “ ”; }

查找:

if($col>1) $artlist .= “<tr> ”;

 

修改为:

 

if($col>1) $artlist .= “ ”;

查找:

if($col>1) $artlist .= ” <td width=’$colWidth’ valign=’top’> ”;

 

修改为:

 

if($col>1) $artlist .= ” ”;

查找:

if($col>1) $artlist .= ” </td> ”;

 

修改为:

 

if($col>1) $artlist .= ” ”

查找:

if($col>1){ $artlist .= ” </tr> ”;}

 

修改为:

 

if($col>1){ $artlist .= ” ”;}

查找:

if($col>1) $artlist .= ” </table> ”;

 

修改为:

 

:if($col>1) $artlist .= ” ”;

 

这样去掉所有table(表格)标签,然后在模板里使用channelArtlist标签,最终显示的内容将不再包含这些table元素了。

 

在{dede:channelArtlist}与{/dede:channelArtlist}就能直接调用最终要显示的内容,不会含有多余的html代码了。原文地址:http://www.zzarea.com/cms/dedecms/292.html

posted @ 2017-02-20 17:50  mengyin  阅读(334)  评论(0编辑  收藏  举报