hi,
i am a bit puzzled about the hasNextPage function in the search context.
here is what i do. i have set my image number per page to 9. my search returns 26 matches. that is 3 pages (9+9+8).
what i do to display the images is a loop using next_image(false,9). i specify 9 otherwise the loop outputs 10 images which is incompatible with my theme. doing this i get 9 images on the first page. good.
at the bottom of the page i put some pagination link like this
if ( hasNextPage() ) { printNextPageLink('Next Page >'); }. on the first page do get the NEXT link. good.
if i click on the pagination link i end up on the second page of the search result (url page/search/keyword/2). there i see 9 images because of my theme but if i look at the code source there are actually 10 images listed. so i definitely miss 1 image that is not going to be displayed on the third page. and also what is weird is that for some reason the hasNextPage() function returns FALSE. i don't understand because if I print the current page number (getCurrentPage()) it says 2 and the total page number (getTotalPages()) says 3.
am i doing something wrong here ?
thank you,
frank.
although i do not explicitly use images_per_row in my theme page, the option has to match the design otherwise it gets screwed. there must be some internal checks or calculations. anyway the next_image issue is fixed. i am left with the hasNextPage returning FALSE when it should be TRUE.
i'm sure i am doing something wrong somewhere but i can't find what. if you can point me to a direction that would be awesome.
thanks. i found that out. i didn't realize it was actually used since i didn't refer to these options myself. once this done i also had to return the next_image call to next_image(false) (and not next_image(false, 9) to get the pagination to work properly. all is working now.