Skip to content

Commit 37c97f9

Browse files
jrengglikdambekalns
authored andcommitted
BUGFIX: Limit search to document nodeTypes
The SearchPlugin outputs all kinds of nodeTypes (e.g. ContentCollections) in the search results. Content nodeTypes have no URL and therefore are not linkable. By limiting the `searchQuery` to only include `TYPO3.Neos:Document` nodeTypes we ensure all search results are linkable and no internal elements (like "contentRight", "sidebar") are included.
1 parent 26b4613 commit 37c97f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Resources/Private/TypoScript/SearchPlugin.ts2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ prototype(Flowpack.SearchPlugin:Search) < prototype(TYPO3.Neos:Content) {
22
templatePath = 'resource://Flowpack.SearchPlugin/Private/Templates/NodeTypes/Search.html'
33

44
searchTerm = ${request.arguments.search}
5-
searchQuery = ${this.searchTerm ? Search.query(site).fulltext(this.searchTerm) : null}
5+
searchQuery = ${this.searchTerm ? Search.query(site).fulltext(this.searchTerm).nodeType('TYPO3.Neos:Document') : null}
66

77
totalSearchResults = ${this.searchQuery.count()}
88

0 commit comments

Comments
 (0)