2

I am not too sure what happens but in my custom search module, the $GLOBALS['pager_total_items'] count is wrong on the first page.

For example, I search for a term and it will display: Showing 1 - 10 of 77 results and the pager shows 9 pages (when it should show only 8).

Then if I click the pager to go to page 2 (or any other page) the display changes to: Showing 11 - 12 of 12 results and the pager now shows 2 pages (which is right).

In my TEMPLATE_preprocess_search_results function, I use $GLOBALS['pager_total_items'][0] to get the total number of results.

Any idea what could go wrong? Or should I post my complete module code?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.