[TYPO3-mvc] Value empty in Fluid but not in Controller?

Cornelius Illi cornelius.illi at hintertuer.net
Tue Apr 26 21:05:35 CEST 2011


Hi,

you have written:
<f:for each="{questions}" as="{question}">
try:
<f:for each="{questions}" as="question">
instead (without {}). Should work then.

HTH, Cornelius

2011/4/26 Oliver Wand <wand at itaw.de>

> Hi Bastian,
>
> thanks for your fast response :-)
>
> > Are you sure, that..
>
> No, what? :-)
>
> > 1. you are in the right action
>
> Yep:
>
> public function listAction() {
>        $questions = $this->questionsRepository->findAll();
>        $this->view->assign('questions', $questions);
>
>        foreach ($questions as $question)
>        {
>                var_dump($question->getTitle());
>        }
> }
>
> and list.html:
>
> <f:for each="{questions}" as="{question}">
>        <f:link.action action="show" arguments="{question : question}">
>                {question.title}
>        </f:link.action>
> </f:for>
>
>
> > 2. that you assigned the value to the view
> > ($this->view->assign('question', $question))
>
> see above
>
> > does
> > <f:debug>{question}</f:debug>
> > return anything?
>
> Just "| debug |"
>
>
> Cheers,
>
> Oliver
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>


More information about the TYPO3-project-typo3v4mvc mailing list