修改织梦dedecms之artlist标签,去掉table
2014-12-22来源:

大家在织梦建站修改模板的时候,肯定会遇到织梦自动生成 table,tr,td 等元素。

而 table,tr,td 在织梦中远远不如

  • 好用, 现在我来教大家如何 还我大div!

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

    然后搜索如下字样

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

    修改为:

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

    查找:

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

    ”;

    修改为:

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

    查找:

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

    ”;

    修改为:

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

    查找:

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

    ”;}

    修改为:

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

    查找:

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

    ”;

    修改为:

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

    查找:

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

    ”;

    修改为:

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

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

    在{dede:channelartlist}与{/dede:channelartlist}就能直接调用最终要显示的内容,不会含有多余的html代码了。

    更多信息请查看IT技术专栏

  • 2026公务员·事业单位培训课程试听报名

    • 报班类型
    • 姓名
    • 手机号
    • 验证码
    Baidu
    map