[Neos] Traversing query results and use template for each element
Carsten Bleicker
carsten at bleicker.de
Mon Feb 17 16:13:43 CET 2014
oh dear ...
just forgot to add the viewhelper namespace fot ts renderer :P
this is solved. thanks a lot :)
Am 16.02.2014 um 17:16 schrieb Carsten Bleicker <carsten at bleicker.de>:
> currently i am fetching nodes by a flow query elaticsearch operation.
> this works realy nice. but i am stuck ant the point traversing over the restults:
>
> prototype(TYPO3.Neos:PrimaryContent).elasticSearch {
> condition = ${q(request).property('arguments.search')}
> type = 'BLEICKER.Bleicker:SearchResult'
> }
>
> prototype(BLEICKER.Bleicker:SearchResult) < prototype(TYPO3.TypoScript:Template){
> templatePath = 'resource://BLEICKER.Bleicker/Private/Templates/TypoScriptObjects/SearchResult.html'
> searchTerm = ${q(request).property('arguments.search')}
> documents = ${q(ElasticSearch.query(site).nodeType('TYPO3.Neos:Document').sortDesc('publicationDate').execute())}
> documentListItem = BLEICKER.Bleicker:SearchResultItem
> }
>
> prototype(BLEICKER.Bleicker:SearchResultItem) < prototype(TYPO3.TypoScript:Template) {
> templatePath = 'resource://BLEICKER.Bleicker/Private/Templates/TypoScriptObjects/SearchResultItem.html'
> title = ${q(node).property('title')}
> description = ${q(node).property('description')}
> publicationDate = ${q(node).property('publicationDate')}
> author = ${q(node).property('author')}
> firstFoundContent = ${q(ElasticSearch.query(node).nodeType('TYPO3.Neos:Content').execute()).get(0)}
> }
>
>
> documentListItem at this point having having the node of the site wich i am currenlty viewing.
> how to make "node" as the current item of traversing "documents"?
>
> kind regards
> carsten
> _______________________________________________
> Neos mailing list
> Neos at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/neos
More information about the Neos
mailing list