[Neos] Creating a New FlowQuery Operation

Dmitri Pisarev dimaip at gmail.com
Sat Jan 31 15:32:15 CET 2015


Hey Nikos!
Maybe this would work?
${q(site).find('[instanceof TYPO3.Neos.NodeTypes:Headline']).get(0)}
Also there's operation .first(), but I don't quite remember if that's what
you need.

Custom FQ operations are super easy too, see some examples here:
https://github.com/sfi-ru/Sfi.News/tree/master/Classes/Sfi/News/TypoScript/Eel/FlowQueryOperations

On Sat, Jan 31, 2015, 2:55 PM nikos <nick at jamalade.com> wrote:

> Hi
>
> In my Typoscript given a node I would like to be able to traverse down
> through the child nodes to find the first occurrence of a particle node type
> say a TYPO3.Neos.NodeTypes:Headline.
>
> I would like to be able to write something like this in my ts:
>
>     theHeadline = $(q(node).FindFirst('[instanceOf
> TYPO3.Neos.NodeTypes:Headline ]').property.('title')}
>
>
> If I had a structure like these
>
> Page
>      main
>          section
>               Headline
> Page
>      main
>          Headline
>
> Page
>      main
>          section
>              image
>          section2
>              Headline
>
> The query would return the Headline.
>
> I can't see a way of doing this at the moment so I figure that I need to
> implement a FlowQuery operation to do this. I am wondering if there is any
> help/guidance available for implementing such an operation.
>
> I would appreciate any guidance with this.
>
> Warm wishes
>
> Nikos
>
>
> _______________________________________________
> Neos mailing list
> Neos at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/neos
>


More information about the Neos mailing list