PbootCMS整理分页判断进阶各种条件判断和标签

黄文博客 / 2024-10-05 / 原文

{pboot:if('{page:rows}' > 0)}
<div class="page">
  <a href="{page:index}" {pboot:2if('{page:current}' == 1)}class="hide"{/pboot:2if}>首页</a>
  <a href="{page:pre}" {pboot:2if('{page:current}' == 1)}class="hide"{/pboot:2if}>上一页</a>
  {page:numbar}
  <a href="{page:next}" {pboot:2if('{page:current}' == '{page:count}')}class="hide"{/pboot:2if}>下一页</a>
  <a href="{page:last}" {pboot:2if('{page:current}' == '{page:count}')}class="hide"{/pboot:2if}>尾页</a>
</div>
{else}
<div class="page">暂无内容</div>
{/pboot:if}