[TYPO3-mvc] Get childs

Frank Krueger fkrueger-ml at mp-group.net
Fri Oct 22 11:07:05 CEST 2010


Hi Dawid,

AFAIK it should go this way:

<f:for each="{blocks}" as=" block">
    <div class="bodytext">
        <f:render partial="DocumentTemplateElement" arguments="{block:
block}" />
    </div>
</f:for>


Cheers,
Frank

-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
[mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
Dawid Pacholczyk
Gesendet: Freitag, 22. Oktober 2010 10:55
An: TYPO3 v4 MVC project
Betreff: Re: [TYPO3-mvc] Get childs

It doesn`t work...or should I say I`m doing something wrong.

One more time.

I have an object./model Block

Block is in relation ONE-TO-MANY with itself

So I have a tree like in mail before

Now I want to display this tree.

I did something like that

/**
 * findByArticle($article) giver me MAIN blocks (level 1) witch are
connected with article *// $this->view->assign('blocks',
$this->blockRepository->findByArticle($article));

I`ve debbuged the array that it retturned. I have tree in there. Now I want
to display So I did like this.

<f:for each="{blocks.block}" as="bl">
    <div class="bodytext">
        <f:render partial="DocumentTemplateElement" arguments="{blocks.bl}"
/>
    </div>
</f:for>

What am I doing wrong ?




More information about the TYPO3-project-typo3v4mvc mailing list