我希望在后端重用某个前端UI元素(在“design/adminhtml”下)。这主要包括重用模板(phtml)。然而,从后端引用前端布局句柄似乎更好。magento是否为共享UI组件提供了一个位置,一种将它们声明为共享的方式,还是一种跨前端/adminhtml划分引用它们的机制?谢谢
发布于 2012-03-18 17:27:57
@coriscus是的,这是可能的。我从管理员那里发现了你使用前端模板的诀窍。
public function __construct()
{
parent::__construct();
$this->setData('area','frontend');
$this->setTemplate('customer/online.phtml');
}只需在块构造函数中设置所需区域即可。
https://stackoverflow.com/questions/9755621
复制相似问题