Coder1
Aricles and Screencasts by Mike Milano
Today is: 11 March, 2010
Check todays hot topics or new pictures
Aricles and Screencasts by Mike Milano
Today is: 11 March, 2010
Check todays hot topics or new pictures
Drupal do_search limit is hard coded to 10 - Here's a work-aroundRecently I had to implement a custom search function using Drupal's do_search() function. I needed to display many more results than 10, which is hard coded in the function. The simple solution was this: 1. Go to http://api.drupal.org/api/function/do_search/6 (make sure you get the function for the correct version of Drupal you are using) 2. Copy the function and rename it to something like do_search_custom. 3. Add a parameter called $limit and make it default to 10. ( $limit=10 ) 4. Replace pager_query argument at the bottom of the function with $limit. |
|||
|
Copyright © 2008, Mike Milano
|
Thanks, the hard coded limit
Thanks, the hard coded limit was driving me crazy.