Ilya Hoilik Posted March 15, 2016 Share Posted March 15, 2016 Hello! There is public variable $resultsToGet in IPS\Content\Search\Query. As a result, we can easily change number of items on the result page when searching. Can you please create the same variable in IPS\core\modules\front\search\search.php? Because there is hard coded number, so we cannot control it: $select = \IPS\Db::i()->select( 'core_members.*', 'core_members', $where, $order, array( ( $page - 1 ) * 25, 25 ) ); ... $pagination = trim( \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->pagination( $baseUrl, ceil( $count / 25 ), $page, 1 ) ); Thanks in advance! Link to comment Share on other sites More sharing options...
Tom Irons Posted March 15, 2016 Share Posted March 15, 2016 There is no need for them to do that, since resultsToGet is a public variable, you can do this to retrieve it. \IPS\Content\Search\Query::init()->resultsToGet Hope it helps! Link to comment Share on other sites More sharing options...
teraßyte Posted March 15, 2016 Share Posted March 15, 2016 The code needs changing because the 25 value is hardcoded instead of using a variable we can update/change. Link to comment Share on other sites More sharing options...
Tom Irons Posted March 15, 2016 Share Posted March 15, 2016 Ah, I misinterpreted what he meant, my fault. Why would you need to change the number? You can just put your own number as one of the parameters. Link to comment Share on other sites More sharing options...
Ilya Hoilik Posted May 14, 2016 Author Share Posted May 14, 2016 @Mark please Link to comment Share on other sites More sharing options...
bfarber Posted May 25, 2016 Share Posted May 25, 2016 It had already been turned into a variable, but I've changed it to a class property for 4.1.13. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.