Simple paging code of the smarty template engine

Source: Internet
Author: User
Simple paging code of the smarty template engine

  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. Previous 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
  23. {/If}
  24. {If $ pageNum eq $ pageCount}
  25. Last page
  26. {Else}
  27. Last page
  28. {/If}
  29. {/If}
  30. ({$ PageCount} pages in total)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.