0
我正在为前端定制magento模块,我添加了一个页面,但此页面未显示内容,请指教我,我错了。波纹管是我的代码:模板未加载在magento自定义模块中
class Gaboli_Warehouse_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
$this->loadLayout();
$this->renderLayout();
}
}
块 -
class Gaboli_Warehouse_Block_Location_List extends Mage_Core_Block_Template
{
public function __construct()
{
parent::__construct();
}
}
布局XML -
<?xml version="1.0"?>
<layout version="0.1.0">
<warehouse_index_index>
<reference name="content">
<block type="warehouse/location_list" name="warehouse_location" template="gaboli/warehouses.phtml" />
</reference>
</warehouse_index_index>
</layout>
路径是正确的....如果我改变了布局xml页面没有任何影响。我能跟踪控制器但不阻止。 – 2015-03-18 12:45:24
在布局xml中,默认引用正在工作,但“warehouse_index_index”不起作用 – 2015-03-18 12:57:24
现在它正在工作,我将处理程序“warehouse_index_index”更改为“gaboli_warehouse_index_index” – 2015-03-20 07:31:15