我被困在非常簡單的任務中,我做了一個自定義模塊並希望添加一個前端頁面。Magento前端塊
我爲前端做了一個塊,並在module.xml文件中使用了html作爲控制器索引函數。
下面是module.xml
<?xml version="1.0"?>
<config>
<modules>
<Coeus_Recurring>
<version>0.1.0</version>
</Coeus_Recurring>
</modules>
<frontend>
<routers>
<recurring>
<use>standard</use>
<args>
<module>Coeus_Recurring</module>
<frontName>recurring</frontName>
</args>
</recurring>
</routers>
<layout>
<updates>
<recurring>
<file>recurring.xml</file>
</recurring>
</updates>
</layout>
</frontend>
<global>
<helpers>
<recurring>
<class>Coeus_Recurring_Helper</class>
</recurring>
</helpers>
<blocks>
<recurring>
<class>Coeus_Recurring_Block</class>
</recurring>
</blocks>
<models>
<recurring>
<class>Coeus_Recurring_Model</class>
<resourceModel>recurring_mysql4</resourceModel>
</recurring>
<recurring_mysql4>
<class>Coeus_Recurring_Model_Mysql4</class>
<entities>
<recurring>
<table>recurring_order</table>
</recurring>
</entities>
</recurring_mysql4>
</models>
<events>
<sales_order_place_after> <!-- identifier of the event we want to catch -->
<observers>
<sales_order_place_after_handler> <!-- identifier of the event handler -->
<type>model</type> <!-- class method call type; valid are model, object and singleton -->
<class>recurring/observer</class> <!-- observers class alias -->
<method>saverecurring</method> <!-- observer's method to be called -->
<args></args> <!-- additional arguments passed to observer -->
</sales_order_place_after_handler>
</observers>
</sales_order_place_after>
</events>
<resources>
<recurring_setup>
<setup>
<module>Coeus_Recurring</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</recurring_setup>
<recurring_write>
<connection>
<use>core_write</use>
</connection>
</recurring_write>
<recurring_read>
<connection>
<use>core_read</use>
</connection>
</recurring_read>
</resources>
</global>
</config>
和最後一個,塊在端代碼/本地/ NS /模塊/塊/ index.php的代碼
類Ns_Module_Block_Index延伸Mage_Core_Block_Template {}
它是非常基本的,但不知道我缺乏和我的文字在module/index.phtml沒有顯示在前端。
我都試過,但沒有成功:( –