我正在浏览“没有多余的magento布局”的示例,并在示例1.11“整页布局”对我不起作用 我得到空白页
看起来fetchview存在问题
public function fetchView ( $fileName )
{
// ignores file name , just uses a simple include with template name
$this -> setScriptPath (
Mage :: getModuleDir ('', ' Nofrills_Booklayout ') .
DS .
'design '
);
return parent :: fetchView ($this -> getTemplate ());
}
我使用的是magento 1.7.0.2社区版
答案 0 :(得分:2)
自己解决了问题。实际上模板文件中缺少以下方法
public function setScriptPath($dir)
{
parent::setScriptPath($dir); //if anything important happens up there in a future version
$this->_viewDir = Mage::getModuleDir('', 'Nofrills_Booklayout') . DS . 'design';
return $this; //as the original
}
添加完整页后,布局正在建立。