I have a list of records; all of them have a field .datetime (of type DateTime)
As step one, I want to have a loop for all records in ascending date order. Step two will be a “sort by pid”, followed by a third step “sort by time”.
But I can’t get the VHS ViewHelper to work…
<f:for each="{recordlist -> v:iterator.sort(sortBy: '{f:format.date(date:recordlist.datetime, format:'Ymd')}')}" as="sortedrecord"> // iterating data which is ONLY sorted while rendering this particular loop {sortrecord.datetime}<br /> </f:for>
ends up in
#1256475113 InvalidArgumentException The argument "each" was registered with type "array", but is of type "string" in view helper "TYPO3FluidFluidViewHelpersForViewHelper".
Any idea how to make the iterator.sort work with a formatted date?
((Iterating directly over the dtaetime field will not work (iterator expects a string type variable), + cant get other inline format options to work.))