列表页分页错位问题解决方案 发表于2020年10月3日2023年10月31日 作者 jiukeshuju 很多网站遇到一个问题,在仿站过程中,目标网站列表页分页是对a标记进行css样式定义的,而 织梦 里面的列表页里面有li标记,就会导致错位,今天编者写了一个函数,就可以解决这个问题 1 if(!function_exists('getNewList')) 2 { 3 function getNewList($str) 4 { 5 $str = preg_replace("#<li(.*?)>|</li>#","",$str); 6 return $str; 7 } 8 } 将这个函数写入到include/extend.func.php,然后列表页调用的时候用 1 {dede:pagelist listitem="index,end,pre,next,pageno" listsize="4"function="getNewList(@me)"/}