Skip to content

Commit

Permalink
Merge pull request #20 from Sterc/simplesearch-facetsearch-pagination…
Browse files Browse the repository at this point in the history
…-fix

Pagination fix when using faceted search
  • Loading branch information
MrRoco authored Mar 15, 2019
2 parents 0f7d806 + 2607052 commit 250d86f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
$placeholders['page'] = isset($_REQUEST[$offsetIndex]) ? ceil((int) $_REQUEST[$offsetIndex] / $perPage) + 1 : 1;
$placeholders['pageCount'] = !empty($resultsTpl[$activeFacet]['total']) ? ceil($resultsTpl[$activeFacet]['total'] / $perPage) : 1;

if (!empty($response['results'])) {
if (!empty($placeholders['results'])) {
/* add results found message */
$placeholders['resultInfo'] = $modx->lexicon('simplesearch.results_found', array(
'count' => $placeholders['total'],
Expand Down Expand Up @@ -181,4 +181,4 @@
$output = $search->getChunk($containerTpl, $placeholders);
}

return $search->output($output, $toPlaceholder);
return $search->output($output, $toPlaceholder);

0 comments on commit 250d86f

Please sign in to comment.