来源: 本站版本: (PHP)JTBC3.0
1. 修改分页类文件
/common/incfiles/lib/JTBC/pagi.inc.php
$tmpstr = str_replace('{$-lastpagelink}', base::htmlEncode(str_replace('[~page]', $num2, $baseLink)), $tmpstr);
下面添加两行
$tmpstr = str_replace('{$-prepagelink}', base::htmlEncode(str_replace('[~page]', ($num1 == $num1s? ($num1s - 1): ($num1 - 1)), $baseLink)), $tmpstr);
$tmpstr = str_replace('{$-nextpagelink}', base::htmlEncode(str_replace('[~page]', ($num1 == $num1s? $num1: ($num1 + 1)), $baseLink)), $tmpstr);
2. 添加分页节点
/common/template/config.jtbc
pagi-3
<a class="link first" href="{$-firstpagelink}">«</a><a class="link last" href="{$-prepagelink}">上一页</a>{@}<a class="link {$-class}" href="{$-link}">{$-num}</a>{@}<a class="link last" href="{$-nextpagelink}">下一页</a><a class="link last" link="{$-lastpagelink}">»</a>
备注:文字可以自己分离
3.模板中调用
<div class="pagi">{$=pagi('{$-pagi-pagenum}', '{$-pagi-pagetotal}', $createURL('list', '{$-category}', array('page' => '[~page]')), 'pagi-3')}</div>
技术支持QQ:925474725