Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Plugin defined in typoscript can't properly set templateFiles.result #4227

Open
l-rapp opened this issue Nov 21, 2024 · 0 comments
Open

Comments

@l-rapp
Copy link

l-rapp commented Nov 21, 2024

Given this typoscript snippet

lib.newsarea < plugin.tx_solr_PiResults_Results
lib.newsarea {
    extensionName = Solr
    pluginName = pi_results
    view.templateFiles.results = EXT:Resources/Private/Templates/solr/Search/NewsareaResults.html
    //OR
    view.templateFiles.results = NewsareaResults
    search.initializeWithQuery = Print
    search.showResultsOfInitialQuery = 1
}

and this setup

    templateFiles {
      results{
        availableTemplates {
            default {
                label = Default Searchresults Template
                file = Results
            }
            newsarea {
                label = Newsarea Template
                file = NewsareaResults
            }
        }
}

I would expect the resulting cObject on the page to use the defined alternative template, which works when it is added via backend as a normal plugin. For some reason, the typoscript / cObject approach ignores the desired template and refuses to render anything but the default one.

I know for a fact that the files are being read, as the search.* settings properly apply to the rendered results plugin. Only the template is being ignored.

Have I made a mistake in the definitions, or is this a bug?

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

No branches or pull requests

1 participant