Search code examples
searchdrupaldrupal-6themes

Search results with no pager and no limit


I'm pretty new to Drupal, but I guess I know how things work. I separated the Advanced Search Form from the search page and made a block from it (that was part 1). Woohoo. Part 2 is the pager-from-nowhere in the search results. Drupal search results are paged by tens and I can't seem to find a way to change it.

Not a decent way that is.

In search.module, there lives a function do_search where the results are fetched with:

pager_query("$select $sort_parameters", 10, 0, $count_select, $arguments);

The 10 - I guess - is the 10 results that are fetched. The do_search function is unthemeable, but I really don't want to hack drupal core...

Any ideas?

I'm using my own theme (no base theme) and Drupal 6.19


Solution

  • copy "search" module to sites/all/modules/custom and then do the modifications in sites/all/modules/custom/search. This is the way to customize the core modules. Drupal will not look for the updates for the modules that are present in sites/all/modules/custom, so what ever you do the modification they will be permanent.

    Please remember to Copy the modules and not to move the modules.