You are here:  » 'Previous' and 'Next Page'


'Previous' and 'Next Page'

Submitted by webwatch on Sun, 2008-02-03 09:54 in

Hi David,

I have a search script, working fine thanks to your previous advice.
I would like to add 'Previous' and 'Next' page links and could really do with some help if that's possible.
The following code is where the results are parsed and the "&Pg=1"; calls the page number.
I need a link to the next page and if the current page is higher than '1' I want a link to the previous page.
I'm also not sure what to do with the 'Next' link if there isn't a next page.
Any help is greatly appreciated.

{
    $url = "http://xml.myfeedaddress";
    $url .= "&q=".urlencode($_GET["q"]);
    $url .= "&Pg=1";
}
    MagicParser_parse("$url","myRecordHandler","xml|MYFEED/ITEMS/ITEM/");

Kind regards

Peter

Submitted by support on Sun, 2008-02-03 15:35

Hi Peter,

The template code for doing this is in the following thread (see my reply)...

http://www.magicparser.com/node/160

That should point you in the right direction - but if you need any more help let me know!

Cheers,
David.

Submitted by webwatch on Tue, 2008-02-05 10:26

Many thanks David. I found exactly what I need there.