欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

dede:channel 数目大小 数目 数量

shiping1 的头像
在 dede:channel 的库文件的大约 107行  发现 
$totalRow = $dsql->GetTotalRow();  
我们再在 大约 115行 增加  $totalRow = $dsql->GetTotalRow();  


再在大约 159行 增加 
$GLOBALS['totalRow'] = $totalRow; 


在前台 dede:channel 可以调用[field:global name='totalRow' /]表示 dede:channel的行的大小 数组的大小

 if($col>1) $likeType .= "</dd>\r\n";
            $GLOBALS['autoindex']++;
            $GLOBALS['totalRow'] = $totalRow; 
            $GLOBALS['lastRow'] = false;
            if($GLOBALS['autoindex'] == ($GLOBALS['totalRow']-1) ){
            $GLOBALS['lastRow'] =  true;
            }

普通分类: