/include/taglib/channelartlist.lib.php
1、
$attlist = 'typeid|0,row|20,cacheid|';
改为
$attlist = 'typeid|0,row|20,cacheid|,limit|';
2、在“$dsql->SetQuery”前面添加
$limit = trim(preg_replace('#limit#is', '', $limit));
if($limit!='') $limitsql = " LIMIT $limit ";
else $limitsql = " LIMIT 0,$totalnum";
3、
$dsql->SetQuery("SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
FROM `ym_arctype` WHERE $tpsql ORDER BY sortrank ASC LIMIT $totalnum");
改为
$dsql->SetQuery("SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
FROM `ym_arctype` WHERE $tpsql ORDER BY sortrank ASC $limitsql");
完成。
{dede:channelartlist limit='0,1'}{/dede:channelartlist}
limit:(起始ID从0开始)表示限定的记录范围(如:limit='1,2' 表示从ID为1的记录开始,取2条记录