I see the "Results Per Page" option in the Solr settings, but it would be nice to be able to provide a few integers that will be shown to the user as a drop-down menu, allowing them to decide how many results they see on a page.
I see the "Results Per Page" option in the Solr settings, but it would be nice to be able to provide a few integers that will be shown to the user as a drop-down menu, allowing them to decide how many results they see on a page.
Comments
Comment #1
wonder95 commentedAnd what happens when someone wants to have a value that's different from the pre-defined options in the list? I've run into that issue in other modules, and having a text field where you can add whatever value you want is much more flexible.
Comment #2
nick_vhWe changed this to allow more flexibility. Not changing again :-)
Comment #3
OldAccount commentedOkay, understandable. Can you point me in the right direct of how to override the default $rows variable with a select list of options on the results display for the end user? I've tried to figure it out on my own but I'm still a PHP novice so it's probably way off and I'm not even sure what the function should be named:
Thank you!
Comment #4
nick_vhYou need hook_form_alter function. Please look at the Drupal API for more information. This is not solr specific :-)
Comment #5
SandraVdv commentedBut you need to pass the value from the hook_form_alter field (dropdown for results per page) to the solr query options (to limit them to the correct value)? How do you do that?