[TYPO3-mvc] object value in array value in Fluid
Sebastian Kurfürst
sebastian at typo3.org
Wed Apr 20 06:43:05 CEST 2011
Hi Jacco,
this is currently not possible, and I doubt if it will ever (at least I
don't see a sensible way of implementing this).
What you can do, however, is to build an extra ViewHelper which calls
the ObjectAccess on the given string, something like:
public function render($objectPath) {
return
Tx_Extbase_Utility_ObjectAccess::getPropertyPath($this->templateVariableContainer,
$objectPath); # Order of parameters might be the other way round, not
sure...
}
then you can do it like:
checked="{my:objectAccess(objectPath:'checkedQuestion.{answer.uid}')}"
It's kinda a hack, but I think this works for now.
We plan to host a session on improving the Form ViewHelpers at the
Developer Days, so then these hacks should not be needed anymore.
Greets,
Sebastian
More information about the TYPO3-project-typo3v4mvc
mailing list