[TYPO3-mvc] How to return Array of Domain Model

Christian Schwan - Dimme GmbH christian.schwan at dimme.ch
Fri Jun 4 15:22:47 CEST 2010


Hello,

 

I got stuck be the following problem:

 

DB Tables:

 

 

-          Product with article field

-          Article with the id of the Product

-           

 

Tx_Productpresenter_Domain_Model_Product

 

 

                /**

                 * @var Tx_Productpresenter_Domain_Model_Article

                 */

                protected $article;

 

                /**

                 * @return string

                 */          

                public function getArticle() {

                               return $this->article;

                }   

 

The Problem is if I have a comma list of articles in the Product table will
not work..

 

 

This is my fluid template:

 

    <f:for each="{products}" as="product">

    {product.title}<br>

    {product.text}<br><br>

    {product.image}

    {product.darft}

    {product.serie.system.title}

      <f:for each="{product.article}" as="article">

      {article.art}fdfg

      </f:for>

 

    </f:for>

 

How can I make a array auf the article?? Does anyone can help me?

 

Christian



More information about the TYPO3-project-typo3v4mvc mailing list