【发布时间】:2014-03-07 14:28:59
【问题描述】:
在我的更新 XML 中有:
<reference name="content">
<remove name="product.info" />
<block type="catalog/product_view" template="catalog/product/imageview.phtml">
<action method="setData"><name>variable</name><value>3</value></action>
</block>
</reference>
我已经创建了 imageview.phtml 并且加载正确。在此模板中,我转储以下内容:
var_dump($this->getVariable());
我的预期结果是:3
但结果是:NULL
我错过了什么?
【问题讨论】:
-
键名是
variable还是别的什么?也许您正在调用的方法存在并返回null?
标签: xml magento variables product