[TYPO3-mvc] Nesting Objects

Mathias Gisch m.gisch at mx.uni-saarland.de
Thu Aug 6 12:45:49 CEST 2009


Hi together,

is it possible to use objects as some kind of index within other objects in
the Fluid-component? :-) Perhaps I explain what I want to do.

I have a list of databasefields set via TS and an object
(Tx_CarDemo_Domain_Model_Car) and I assign both to the view as follows:

$car = new Some_Tx_CarDemo_Domain_Model_Car_Object;
$list = 'uid,license';
$this->view->assign('keys',explode(',',$list));
$this->view->assign('car',$car);

In the view I want to do the following:

<ul>
<f:for each="{keys}" as="key">
   <li> {car.{key}} </li>
</f:for>
</ul>

Is this possible with the current ViewHelpers, or do I have to write my own
Viewhelper? I could not get it to work.

Greetings,

   Mathias


More information about the TYPO3-project-typo3v4mvc mailing list