How to turn off the pagination for the search block results in 5.7

Permalink
Hi there,
is it possible to turn off the pagination for the search blocks results (or at least to increase the number of the items per page from 10 to 100)???

I tried a lot of hours... No success.

Best
Mathias

MathiasB
 
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
Hi MathiasB,

You can try overriding the Search block controller.
- copy controller.php
concrete\blocks\search\controller.php
- in the application\blocks folder, create a new folder called "search"
- paste controller.php into the "search" folder
application\blocks\search\controller.php
- open controller.php and change the namespace
from:
namespace Concrete\Block\Search;

to:
namespace Application\Block\Search;

- search for "$pagination = $ipl->getPagination();" and directly below it add a new line with the following:
$pagination->setMaxPerPage(100);

Before making any changes to your site, make sure to make a full backup (files and database).
MathiasB replied on at Permalink Reply
MathiasB
You again... :-)
IT WORKS GREAT!
The namespace... I didn't know that.
Thank you so much.