File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ' Flowpack.SearchPlugin:Search ' :
2+ superTypes : ['TYPO3.Neos:Content']
3+ ui :
4+ label : ' Search'
5+ icon : ' icon-search'
Original file line number Diff line number Diff line change 1+ TYPO3 :
2+ Neos :
3+ typoScript :
4+ autoInclude :
5+ ' Flowpack.SearchPlugin ' : TRUE
Original file line number Diff line number Diff line change 1+ {namespace neos=TYPO3\Neos\ViewHelpers}
2+ {namespace ts=TYPO3\TypoScript\ViewHelpers}
3+ SEARCs {searchWord}
4+ < div class ="search-results ">
5+ < f:if condition ="{searchResults -> f:count()} ">
6+ < dl >
7+ < f:for each ="{searchResults} " as ="searchResult ">
8+ < f:alias map ="{documentNode: '{ts:render(path: \'searchResultDocument\', context: {searchResult: \'{searchResult}\'})}'} ">
9+ < f:if condition ="{documentNode} ">
10+ < dt >
11+ < neos:link .node node ="{documentNode} "> {documentNode.fullLabel}</ neos:link .node>
12+ </ dt >
13+ < dd >
14+ < ts:render path ="searchResultContentRenderer " context ="{node: searchResult} " />
15+ </ dd >
16+ </ f:if >
17+ </ f:alias >
18+ </ f:for >
19+ </ dl >
20+ </ f:if >
21+ </ div >
Original file line number Diff line number Diff line change 1+ prototype(Flowpack.Search:Search) {
2+ searchResults = ${Search.query(site).fulltext(request.arguments.search).execute()}
3+ searchWord = "foo"
4+
5+ searchResultDocument = ${searchResult ? q(searchResult).closest('[instanceof TYPO3.Neos:Document]').get(0) : null}
6+
7+ searchResultContentRenderer = ${String.crop(String.stripTags(q(node).property('title') + q(node).property('text')), 300) + '...'}
8+
9+ @cache {
10+ mode = 'uncached'
11+ context {
12+ 1 = 'site'
13+ }
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " flowpack/searchplugin" ,
3+ "type" : " typo3-flow-package" ,
4+ "description" : " Add description here" ,
5+ "require" : {
6+ "typo3/flow" : " *"
7+ },
8+ "autoload" : {
9+ "psr-0" : {
10+ "Flowpack\\ SearchPlugin" : " Classes"
11+ }
12+ }
13+ }
You can’t perform that action at this time.
0 commit comments