
PbootCms模板当列表页只有一页的时候不显示分页的小技巧
今天看到一个网友需要解决当列表也只有1页的时候不显示分页的方法。
安排。
page:count 表示总页数,我们只需要加一个判断,当总页数大于1的时候显示分页条就搞定啦。02 | {pboot: if ({page:rows}>0)} |
03 | {pboot:1if({page:count}>1)} |
05 | <a class= "page-item page-link" href= "{page:index}" >首页</a> |
06 | <a class= "page-item page-link" href= "{page:pre}" >上一页</a> |
08 | <a class= "page-item page-link" href= "{page:next}" >下一页</a> |
09 | <a class= "page-item page-link" href= "{page:last}" >尾页</a> |
|