首页 > CMS建站 > 织梦DEDE > 正文

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

2021-01-18 22:37:59
字体:
来源:转载
供稿:网友
很多网站遇到一个问题,在仿站过程中,目标网站列表页分页是对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)"/}
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表