[TYPO3-mvc] Wrong f:count

Fabian Fisahn fisahn at its-immaterial.com
Tue Apr 12 14:16:43 CEST 2011


Hello,

I have a strange problem:

Controller:
$products =  $this->productsRepository->findAll();
$this->view->assign('items', $products);

Fluid Template:
<f:count subject="{items}" />

The count result is incorrect

If I insert a foreach in the controller, the result will be correct:
$products =  $this->productsRepository->findAll();
foreach($products as $product){
}
$this->view->assign('items', $products);

Strange, because the foreach does nothing.

Is there a way to avoid the the foreach?

Fabian


More information about the TYPO3-project-typo3v4mvc mailing list