Typo3 此->查看->分配('productArticle',$someproductArticle)但奇怪的是,我说代码在另一个控制器的另一个操作中,如果存在类似的命名空间问题,那么可能会有许多例外。对于出现在同一页面的不同模板,productArticle变量
Typo3 此->查看->分配('productArticle',$someproductArticle)但奇怪的是,我说代码在另一个控制器的另一个操作中,如果存在类似的命名空间问题,那么可能会有许多例外。对于出现在同一页面的不同模板,productArticle变量,typo3,fluid,typo3-flow,Typo3,Fluid,Typo3 Flow,此->查看->分配('productArticle',$someproductArticle)但奇怪的是,我说代码在另一个控制器的另一个操作中,如果存在类似的命名空间问题,那么可能会有许多例外。对于出现在同一页面的不同模板,productArticle变量被分配了-实际上没有在刚分配的模板中使用:$this->view->assign('productArticles',$recentProductThree);-不同的操作和不同的控制器。一旦我注释掉assign语句,异常就消失了。等等,那是错
此->查看->分配('productArticle',$someproductArticle)但奇怪的是,我说代码在另一个控制器的另一个操作中,如果存在类似的命名空间问题,那么可能会有许多例外。对于出现在同一页面的不同模板,productArticle变量被分配了-实际上没有在刚分配的模板中使用:
$this->view->assign('productArticles',$recentProductThree);
-不同的操作和不同的控制器。一旦我注释掉assign语句,异常就消失了。等等,那是错误的代码,我的意思是:$this->view->assign('productArticle',$someproductArticle);
但奇怪的是,我说过代码在另一个控制器的另一个操作中,如果存在类似的命名空间问题,那么可能会有许多例外情况。对于出现在同一页面上的不同模板,productArticle变量被分配了-实际上没有在刚刚分配的模板中使用:$this->view->assign('productArticles',$recentProductThree);
-不同的操作和不同的控制器。一旦我注释掉assign语句,异常就消失了。等等,那是错误的代码,我的意思是:$this->view->assign('productArticle',$someproductArticle)
但奇怪的是,我说过代码在另一个控制器的另一个操作中,如果存在这样的名称空间问题,那么可能会有很多这样的异常。
Exception while rendering
page<TYPO3.Neos:Page>/
body<TYPO3.TypoScript:Template>/
content/
main<TYPO3.Neos:PrimaryContent>/
default<TYPO3.TypoScript:Matcher>/
element<TYPO3.Neos:ContentCollection>/
itemRenderer<TYPO3.Neos:ContentCase>/
default<TYPO3.TypoScript:Matcher>/
element<TYPO3.Neos.NodeTypes:TwoColumn>/
columns<TYPO3.TypoScript:Collection>/
itemRenderer<TYPO3.Neos.NodeTypes:MultiColumnItem>/
columnContent<TYPO3.Neos:ContentCollection>/
itemRenderer<TYPO3.Neos:ContentCase>/
default<TYPO3.TypoScript:Matcher>/
element<MyCompany.Store:RecentlyViewedProduct>:
Duplicate variable declaration, "productArticle" already set! (20141105131932df2032)
<f:layout name="Default" />
<f:section name="Title">
<h3>
<f:translate id="MyCompany.Store.Recently-Viewed">Recently Viewed</f:translate>
</h3>
</f:section>
<f:section name="Content">
<f:if condition="{productArticles}">
<f:then>
<f:for each="{productArticles}" as="productArticle">
<f:link.action action="showProductArticle" controller="Product" arguments="{productArticle: productArticle}">{productArticle.product.name}</f:link.action><br />
</f:for>
</f:then>
<f:else>
<p>
<f:translate id="MyCompany.Store.No-Recently-Viewed">No recently viewed product</f:translate>
</p>
</f:else>
</f:if>
</f:section>
/**
* Shows most recently viewed products
*
* @param \MyCompany\Store\Domain\Model\ProductArticle $productArticle
* @return void
*/
public function recentlyViewedProductsAction() {
$recentProduct = $this->cart->getProductArticle();
$recentProductThree = array_reverse($recentProduct);
array_splice($recentProductThree, 3);
if (count($recentProduct) !== 0) {
$this->view->assign('productArticles', $recentProductThree);
}
}
$this->view->assignMultiple(array(
'message' => 'xxx',
'messages' => $messages,
));