Author Topic: Add link for next page and back page - seperate to paging  (Read 3865 times)

0 Members and 1 Guest are viewing this topic.

Offline propertysnaps

  • Newbie
  • *
  • Posts: 14
    • View Profile
Add link for next page and back page - seperate to paging
« 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.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Add link for next page and back page - seperate to paging
« Reply #1 on: February 26, 2009, 10:20:38 AM »
In categories.php find:
  "paging" => $getpaging->get_paging(),

Insert below:
  
"page_next" => ($page <= $getpaging->total_pages) ? $link_arg "&amp;page=" . ($page 1) : "",
  
"page_prev" => ($page 1) ? $link_arg . (($page 2) ? "&amp;page=" . ($page 1) : "") : "",


In template use {page_next} and {page_prev} tags
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)