我正在为 Magento 编写一个自定义小部件。我已成功配置 - 文件ABC/DEF/Resources.php
已加载并执行。
class ABC_DEF_Block_Resources extends Mage_Core_Block_Abstract implements Mage_Widget_Block_Interface{
protected function _prepareLayout(){
var_dump($this->getData());
}
}
当包含在静态 CMS 块中时
{{widget type="def/resources" res="css:test.css"}}
一切正常返回
array(2) { ["type"]=> string(15) "def/resources" ["res"]=> string(11) "css:test.css" }
但是,当通过CMS->Widgets
( Block Reference: Page Top
) 包含时,结果是
array(1) { ["type"]=> string(15) "def/resources" }
有什么办法吗?