Breaking: #102925 - Template changes in Indexed Search 

See forge#102925

Description 

Due to some major refactorings within EXT:indexed_search, Fluid templates in the frontend plugins were adapted.

Impact 

In case Fluid templates of EXT:indexed_search are overridden, the rendered output may look different and behave unpleasant.

Affected installations 

All installations overriding Fluid templates of EXT:indexed_search are affected.

Migration 

Pagination 

The pagination ViewHelpers have been removed in favor of native pagination API shipped with TYPO3. Usages of the ViewHelpers is:pageBrowsingResults and is:pageBrowsing have been removed.

The Fluid template file Private/Templates/Search/Search.html loads a new JavaScript via <f:asset.script> :

<f:asset.script useNonce="true" identifier="indexed_search_pagination" src="EXT:indexed_search/Resources/Public/JavaScript/pagination.js" />
Copied!

is:pageBrowsingResults has been replaced with a short HTML snippet:

<f:sanitize.html>
    <f:translate key="displayResults" arguments="{0: result.pagination.startRecordNumber, 1: result.pagination.endRecordNumber, 2: result.count}" />
</f:sanitize.html>
Copied!

is:pageBrowsing has been replaced with a new Fluid partial file:

<f:render partial="Pagination" arguments="{pagination: result.pagination, searchParams: searchParams, freeIndexUid: freeIndexUid}" />
Copied!

Search result items 

The following options are now passed to the Searchresult partial:

  • row: row
  • searchParams: searchParams
  • firstRow: firstRow

The Searchresult partial now registers the is namespace for Fluid ViewHelpers:

<html
    xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
    xmlns:is="http://typo3.org/ns/TYPO3/CMS/IndexedSearch/ViewHelpers"
    data-namespace-typo3-fluid="true">
Copied!

Within the Searchresult partial, {row.rating} has been replaced with a ViewHelper invocation:

{is:searchResult.rating(firstRow: firstRow, sortOrder: searchParams.sortOrder, row: row)}
Copied!

Rules 

Remove any overrides for the partial file Resources/Private/Partials/Rules.html, as well as the <f:render partial="Rules" /> invocation from a potentially overridden Resources/Private/Partials/Form.html partial file.