4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: propertysnaps on February 26, 2009, 09:36:25 AM
-
Hello,
Is it possible to add a button (image) to my categories.html page that will make it go to the next page?
I already have the paging setup like this << 1,2,3,4 >> last page
But I want to add some extra buttons on another part of the screen,
I want one of those buttons to take me to the next page (so it will go to: /categories.php?cat_id=7&page=2) where the 2 is the next page
Does any one know what code I can add to the link to make it dyanmically go to the next page?
I would have thought that categories.php?cat_id=7&page=$next_page would work - but it doesnt.
-
In categories.php find:
"paging" => $getpaging->get_paging(),
Insert below:
"page_next" => ($page <= $getpaging->total_pages) ? $link_arg . "&page=" . ($page + 1) : "",
"page_prev" => ($page > 1) ? $link_arg . (($page > 2) ? "&page=" . ($page - 1) : "") : "",
In template use {page_next} and {page_prev} tags