Home >Backend Development >PHP Tutorial >Simple paging code for smarty template engine

Simple paging code for smarty template engine

WBOY
WBOYOriginal
2016-07-25 08:59:371095browse
  1. {if $pageCount > 1}
  2. {foreach item=i from=$pagerList}
  3. {if $pageNum eq $i}
  4. {$i}
  5. {else}
  6. {$i}
  7. {/if}
  8. {/foreach}
  9. {if $pageNum eq 1}
  10. Up One page
  11. {else}
  12. Previous page
  13. {/if}
  14. { if $pageNum eq $pageCount }
  15. Next page
  16. {else}
  17. Next page
  18. {/if}
  19. {if $pageNum eq 1}
  20. Homepage
  21. {else}
  22. Homepage< /a>
  23. {/if}
  24. {if $pageNum eq $pageCount}
  25. Last page
  26. {else}
  27. Last page
  28. {/if}
  29. {/if}
  30. (Total {$pageCount} pages)
Copy code


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn