The following is the smarty code in the template. you can simply use smarty to replace the relevant variables. it is very simple, but you need to input the page parameter in the php code. I think this is quite simple. I like smarty more and more. The following is the template's smarty code. it is simple to use smarty to simply substitute the relevant variables, but the page parameter must be passed in the php code. I think this is quite simple. I prefer smarty more and more.
{If $ pageCount> 1}
{Foreach item = I from = $ pagerList}
{If $ pageNum eq $ I}
{$ I}
{Else}
{$ I}
{/If}
{/Foreach}
{If $ pageNum eq 1}
Previous Page
{Else}
Previous Page
{/If}
{If $ pageNum eq $ pageCount}
Next page
{Else}
Next page
{/If}
{If $ pageNum eq 1}
Homepage
{Else}
Homepage
{/If}
{If $ pageNum eq $ pageCount}
Last page
{Else}
Last page
{/If}
{/If}
({$ PageCount} pages in total)
I just gave an idea. In fact, paging is not so complicated. there are always so many people who are very mysterious. I used this on our company's website. This is done according to what the artist gave.
There are no unsolved problems, only unexpected ideas
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.