标题:织梦CMS列表页分页错位问题解决方案
作者:网友
日期:2021-01-18 22:37:56
内容:

很多网站遇到一个问题,在仿站过程中,目标网站列表页分页是对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)"/}


返回列表 网站首页