Skip to main content
 Web开发网 » 站长学院 » 织梦教程

织梦模板列表页分页错位问题解决方案

2020年09月12日6150百度已收录

很多网站遇到一个问题,在仿站过程中,目标网站列表页分页是对a标记进行css样式定义的,而织梦里面的列表页里面有li标记,就会导致错位,今天编者写了一个函数,就可以解决这个问题。

 

 

if(!function_exists('getNewList'))

{

    function getNewList($str)

    {

        $str = preg_replace("#<li(.*?)>|</li>#","",$str);

        return $str;

    }

}

将这个函数写入到include/extend.func.php,然后列表页调用的时候用。

 

{dede:pagelist listitem="index,end,pre,next,pageno" listsize="4" function="getNewList(@me)"/}


 

评论列表暂无评论
发表评论
微信