<!--parser:xtscript-->
# Paging function
function paging_template $url;$page;$active_page;$total_pages;
# Only one page so exit
if $total_pages == 1
return
endif
# Paging container
if $page == 1
print <div class="custom_paging">
endif
# Previous
if ($page+1) == $active_page
print <a href="$url">prev</a>
endif
# Next
if ($page-1) == $active_page
print <a href="$url">next</a>
endif
if $page == $total_pages
print </div>
endif
endfunction
<!--/parser:xtscript-->
Copy code
how many items per page is set in the blog function
# Paging function
function paging_template $url;$page;$active_page;$total_pages;
# Only one page so exit
if $total_pages == 1
return
endif
# Paging container
if $page == 1
print <div class="custom_paging">
endif
# Previous
if ($page+1) == $active_page
print <a href="$url">prev</a>
endif
# Next
if ($page-1) == $active_page
print <a href="$url">next</a>
endif
if $page == $total_pages
print </div>
endif
endfunction
<!--/parser:xtscript-->
Copy code