[TYPO3-mvc] FED SortViewHelper

Henjo Hoeksma me at henjohoeksma.nl
Fri Dec 9 12:17:45 CET 2011


Hi list,

I thought to try out one of FED's VH's for a change since it comes loaded
with lot's of good stuff. (Thanks Claus!).

My first contact is unfortunately not glorious. The Data/SortViewHelper use
getTimeStamp() which is a PHP 5.3 > feature and of course I need it on a
server running PHP 5.2
I altered it to use format('U') instead - which is the general way of
dealing with this afaik.

I have a person object who has multiple items attached to him/her. These
item contain a (new) date property for closure date of the item.
The items are manually added by editors in the BE and are based on a MM
relation.

I hoped to be able to sort this with:

<f:for each="{fed:data.sort(objectStorage: person.items, sortBy: 'date',
order: 'DESC')}" as="item" iteration="itemIterator">

Unfortunately it doesn't seem to work at all.

Isn't it possible for related objects?

Kind regards,

Henjo

Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.


More information about the TYPO3-project-typo3v4mvc mailing list