Skip to content

Pagination Results works with Default configuration now#104

Open
MohsinQK wants to merge 1 commit intorupertgermann:masterfrom
MohsinQK:pagebrowser-results-fixed
Open

Pagination Results works with Default configuration now#104
MohsinQK wants to merge 1 commit intorupertgermann:masterfrom
MohsinQK:pagebrowser-results-fixed

Conversation

@MohsinQK
Copy link

Pagination results were broken because of this configuration. now the pagination results are working fine.
for the root of the Problem and how to use the more flexible way for that results you can check into
typo3/sysext/frontend/Plugins/AbstractPlugin.php:675

image

Pagination results were broken because of this configuration. now the pagination results are working fine.
for the root of the Problem and how to use the more flexible way for that resutls you can check into
typo3/sysext/frontend/Plugins/AbstractPlugin.php:675

            if ($wrapper['showResultsNumbersWrap']) {
                // This will render the resultcount in a more flexible way using markers (new in TYPO3 3.8.0).
                // The formatting string is expected to hold template markers (see function header). Example: 'Displaying results ###FROM### to ###TO### out of ###OUT_OF###'
                $markerArray['###FROM###'] = $this->cObj->wrap($this->internal['res_count'] > 0 ? $pR1 : 0, $wrapper['showResultsNumbersWrap']);
                $markerArray['###TO###'] = $this->cObj->wrap(min($this->internal['res_count'], $pR2), $wrapper['showResultsNumbersWrap']);
                $markerArray['###OUT_OF###'] = $this->cObj->wrap($this->internal['res_count'], $wrapper['showResultsNumbersWrap']);
                $markerArray['###FROM_TO###'] = $this->cObj->wrap(($this->internal['res_count'] > 0 ? $pR1 : 0) . ' ' . $this->pi_getLL('pi_list_browseresults_to', 'to') . ' ' . min($this->internal['res_count'], $pR2), $wrapper['showResultsNumbersWrap']);
                $markerArray['###CURRENT_PAGE###'] = $this->cObj->wrap($pointer + 1, $wrapper['showResultsNumbersWrap']);
                $markerArray['###TOTAL_PAGES###'] = $this->cObj->wrap($totalPages, $wrapper['showResultsNumbersWrap']);
                // Substitute markers
                $resultCountMsg = $this->templateService->substituteMarkerArray($this->pi_getLL('pi_list_browseresults_displays', 'Displaying results ###FROM### to ###TO### out of ###OUT_OF###'), $markerArray);
            } else {
                // Render the resultcount in the "traditional" way using sprintf
                $resultCountMsg = sprintf(str_replace('###SPAN_BEGIN###', '<span' . $this->pi_classParam('browsebox-strong') . '>', $this->pi_getLL('pi_list_browseresults_displays', 'Displaying results ###SPAN_BEGIN###%s to %s</span> out of ###SPAN_BEGIN###%s</span>')), $count > 0 ? $pR1 : 0, min($count, $pR2), $count);
            }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant