我想获取一个magento模型的变量。在我的app/code/community/Project/Module/Model/Module.php
中,我声明了一个像这样的变量:从一个magento模型获取公共属性
public var =“image_predefined”;
我想从app/design/frontend/product/default/template/product/extension/image.phtml
得到这个变量,我可以mage::getModel($model)
其中$model
包含我的模型得到的型号名称。但我无法直接获取该属性。我尝试了->var
或getAttribute()
但它不起作用。
我该怎么做才能得到变量?