Magento模块开发第二部分

4. 创建Block
4.1 Block类
在config.xml中的global段中有下面的block声明:
<blocks>
	<!-- 块声明 -->
</blocks>




我们加入以下块声明:
<blocks>
	<helloworld>
		<class>Glamour_HelloWorld_Block</class>
	</helloworld>
</blocks>

其中,helloworld标签用于调用createBlock方法时传入的参数的组成,class是HelloWorld模块的所有Block类的公共名字。每个Block类再加入自己的类名,构成完整的类名。

《未完待续》

你可能感兴趣的:(xml)