Login
·
Signup
Home
»
XtGem
»
Tips and code snippets
»
i am newbie ! on xtgem graham help me for code
» View post
Graham
ArKumar
Here is a updated version of the custom paging script that uses the same classes
it goes in a code block above the filelist function
<!--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 and First page button if $page == 1 print <div class="filelist_paging"> if $page == $active_page print <span>«</span> elseif $page == 1 print <a href="$url">«</a> endif # Previous four pages buttons if ($page+1) == $active_page or ($page+2) == $active_page or ($page+3) == $active_page or ($page+4) == $active_page print <a href="$url">$page</a> endif # Current page button if $page == $active_page print <span>$page</span> endif # Next four pages buttons if ($page-1) == $active_page or ($page-2) == $active_page or ($page-3) == $active_page or ($page-4) == $active_page print <a href="$url">$page</a> endif # Last page button total pages and close paging container if $page == $total_pages if $page==$active_page print <span>»</span> elseif $page == $total_pages print <a href="$url">»</a> endif if $page == $total_pages print <div>total pages = $total_pages</div></div> endif endfunction <!--/parser:xtscript-->
#
2014-11-14 11:56 (edited 2014-11-16 01:07 by
Graham
) ·
(0)
Home
»
XtGem
»
Tips and code snippets
»
i am newbie ! on xtgem graham help me for code
» View post
Online: Guests: 1
Log in