[Neos] TypoScript 2 Question

nikos nick at jamalade.com
Sat Sep 6 17:49:49 CEST 2014

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?

   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 

Many thanks


More information about the Neos mailing list