ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### 1.加入路由 根目录`/addons/cms/Cms.php`文件的`appInit`方法,加入分页伪静态路由 ``` Route::rule('lists/<catid>_<page>/[:condition]', 'cms/index/lists')->pattern(['catid' => '\d+', 'condition' => '[0-9_&=a-zA-Z]+', 'page' => '[\d]+']); ``` ### 2.标签设置伪静态规则 {php}$pagepath="/lists/".$catid."_[PAGE].html";{/php} {yzn module="cms" action="lists" catid="$catid" num="5" page="$page" return="data" pagepath="$pagepath"} ### 3.最后你的分页如下 http://您的域名/lists/5_2.html //栏目5第2页 http://您的域名/lists/5_3.html //栏目5第3页 http://您的域名/lists/5_4.html //栏目5第4页 .... ### 4.以上方法仅适合简单分页,复杂的伪静态需要自行重写`application\cms\paginator\Page.php`