TYPO3/TypoScript - custom orderings in DataProcessor with FIELD()

Viewed 58

Is it possible to set orderBy via TypoScript with something like: ORDER BY FIELD(fieldname, value1, value2...)?

if I simply set this:

uidInList = 59,56
orderBy = FIELD(uid, 59, 56)

I get this error. enter image description here The quotation marks aren't set correct and the "ASC" inside the FIELD() section isnt correct.

Then I tried:

orderBy.stdWrap = FIELD(uid, | )
orderby.value = 59, 56

This seems to be completely ignored due to the resulting query debugged in admin panel.

Thanks

1 Answers

It's not possible to use that because TYPO3 is handling every string part (divided with space) as one table field. If you strongly need that FIELD() usage, you need to use a userFunc or write your own extended DataProcessor.

Related