Christian Tauscher
2018-08-07 09:49:37 UTC
Hi dear developers.
Even it became a quiet place here I give it a try:
I habe an extbase Extention written.
in my view i do this:
//the model is a name, uid, wahtever... and a >image<!
$singleObject = $this->getOneSpecialRecordFromDB();
$moreObjects = $this->getAllFromDB();
$this->view->assign('theSingleData', $singleObject);
$this->view->assign('theMultipleData', $moreObjects);
OK so far. Lets have a look inside fluid:
for theSingleData f:debug gives me this for the image:
image => TYPO3\CMS\Extbase\Domain\Model\FileReferenceprototypepersistent
entity (uid=17069, pid=341)
perfekt! i can render the image with f:image as easy as all the other
fields.
since 'theMultipleData' is a array of 1or more of these Objects I use a
loop:
<f:for each="{theMultipleData}" as="item">
<f:debug>{item}</f:debug>
</f:for>
it loops throug the array as expected, giving me fluid accessible names,
uids end everything, but
image => 1
Where has my Image gone to? image=>1 means there is ONE image, but the
Object is lost!?!?
Can you help me understanding/solving this?
Thank you!
Christan.
Even it became a quiet place here I give it a try:
I habe an extbase Extention written.
in my view i do this:
//the model is a name, uid, wahtever... and a >image<!
$singleObject = $this->getOneSpecialRecordFromDB();
$moreObjects = $this->getAllFromDB();
$this->view->assign('theSingleData', $singleObject);
$this->view->assign('theMultipleData', $moreObjects);
OK so far. Lets have a look inside fluid:
for theSingleData f:debug gives me this for the image:
image => TYPO3\CMS\Extbase\Domain\Model\FileReferenceprototypepersistent
entity (uid=17069, pid=341)
perfekt! i can render the image with f:image as easy as all the other
fields.
since 'theMultipleData' is a array of 1or more of these Objects I use a
loop:
<f:for each="{theMultipleData}" as="item">
<f:debug>{item}</f:debug>
</f:for>
it loops throug the array as expected, giving me fluid accessible names,
uids end everything, but
image => 1
Where has my Image gone to? image=>1 means there is ONE image, but the
Object is lost!?!?
Can you help me understanding/solving this?
Thank you!
Christan.