tpwd / ke_search

Search Extension for TYPO3 Content Management System, including faceting search functions.
https://extensions.typo3.org/extension/ke_search/
GNU General Public License v3.0
8 stars 31 forks source link

Pagination template can't include partials because setPartialRootPaths() is never called #174

Closed Defcon0 closed 10 months ago

Defcon0 commented 1 year ago

Hello,

I just tried to override the Widget/Pagination.html which worked. But then I tried to use a partial in it which didn't work.

It's mainly because the partialRootPaths aren't loaded at all:

https://github.com/tpwd/ke_search/blob/master/Classes/Lib/Pluginbase.php#L975

That could simply be fixed by adding

$view->setPartialRootPaths($this->conf['view']['partialRootPaths']);

in Pluginbase::renderPagebrowser().

In addition, in my project I have the case that I have more than 1 partials path. Hence, I can't just use the constant "plugin.tx_kesearch.partialRootPath".

Now I tried to fix that by using the following typoscript setup:

constants.typoscript:

@import 'EXT:ke_search/Configuration/TypoScript/constants.typoscript'

plugin.tx_kesearch.templateRootPath = EXT:sitepackage/Resources/Private/Fluid/Extension/KeSearch/Templates/
plugin.tx_kesearch.partialRootPath = EXT:sitepackage/Resources/Private/Fluid/Extension/KeSearch/Partials/

setup.typoscript:

@import 'EXT:ke_search/Configuration/TypoScript/setup.typoscript'

plugin.tx_kesearch_pi1 {
    view {
        partialRootPaths.200 = EXT:sitepackage/Resources/Private/Fluid/Components/
    }
}

This indeed works for the searchbox plugin but not for the resultlist and also not for the pagination when I add

$view->setPartialRootPaths($this->conf['view']['partialRootPaths']);

in Pluginbase::renderPagebrowser() as mentioned before. The additional partialRootPath is simply mising in $this->conf and I have no idea, why.

What can I do about that?

Thanks in advance

Bye Defcon0

Defcon0 commented 10 months ago

Thanks for the change @christianbltr . I adjusted my setup and it works now. :+1:

But ain't that a breaking change in a minor version (5.1.3 to 5.2)?

christianbltr commented 10 months ago

Yes, you are right. Maybe it would have been better to tag version 6. But on the other hand I would prefer to tag version 6 when it is compatible with TYPO3 13. And it is mentioned as a breaking change in the changelog.