[Neos] TypoScript 2 Question

nikos nick at jamalade.com
Mon Sep 8 10:02:07 CEST 2014

Hi all

Also I am wondering why I can't use the EEL helper String.toString to get this to work?
    thefilteredCollection = ${q(myCollection).children("[articleTags*=String.toString(theSearchString)]")}

I have also tried to use override to see if that works but it doesn't ie.

    override.searchString = ${q(node).property('searchString')}
    thefilteredCollection = ${q(myCollection).children("[articleTags*=String.toString(theSearchString)]")}

What I don't understand is  if I hard code a string I can get it to work so why can't I use a string contained in a variable from the context?

I hope somebody is able to help?!

Many thanks

(loosing my hair over this !)

On 06/09/2014 16:49, nikos wrote:
> Hi all
> I have what seems like a simple use case  but I am struggling to get it to work in TypoScript.
> Simply put how do I use  string node property to filter items in a collection:
> so if I have a node property of type string called searchString, how do I use this value in a filter?
> eg.
>    ...
>    theSearchString = ${q(node).property('searchString')}
>    # I searching here for nodes which have the property artcileTags and contain the value theSearchSring
>    thefilteredCollection = ${q(myCollection).children("[articleTags*=theSearchString]")}
> The above doesn't work but, it returns an empty collection, but it does return a correctly populated collection if I hard code a string such 'all'
> ie. thefilteredCollection = ${q(myCollection).children("[articleTags*='all']")}
> So how do I get to use the at the string value that I know is in property 'searchString' in this TypoScript?
> I hope someone can help as it is driving me mad as it seems such an easy thing to do in principle so I can only assume I am missing something obvious
> (again!).
> Many thanks
> Nikos

More information about the Neos mailing list