0
我創建的模塊將在mysite.com/memymodule/index/indexMagento的添加模塊來索引操作Page
擁有自己的頁面我想從一個模板文件從模板添加功能/我/ template.phtml
我有一個索引控制器是這樣的:
<?php
class me_mymodule_IndexController extends Mage_Core_Controller_Front_Action {
public function indexAction() {
$this->loadLayout();
$this->renderLayout();
}
}
?>
我有一個佈局更新mymodule.xml,看起來像這樣:
<?xml version="1.0"?>
<layout version="0.1.0">
<mymodule_index_index>
<reference name="content">
<block type="core/template" name="me.mymodule" template="me/template.phtml" />
</reference>
</mymodule_index_index>
</layout>
模塊的正面名稱是mymodule
當頁面呈現的內容塊完全爲空時,template.phtml的內容完全被忽略。
幫助非常感謝:-)
謝謝,我得到「陣列(0){}」不知道這意味着什麼...... 我知道,更新部分是在config.xml OK,因爲當我更新整個網站可以看到這些變化。只有當我更改爲時才能看到任何內容。 –
2012-08-08 05:15:11
忽略這一點,我現在明白了,我已經刪除了這兩個佈局代碼。它的工作原理非常感謝,並且非常樂意學習這樣的新功能:-) – 2012-08-08 05:18:11
感謝Metthew。 :) – aforankur 2012-08-08 06:32:49