if ($pages>1) {
should be:
if ($pages>0) {
it uses a zero based index, so when the results show exactly two pages it wasn't displaying when it should.
Thanks now it is working!
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.