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