解释这些 xml 文件我写的 magento

explain these xml files what i have written of magento

http://www.magentocommerce.com/wiki/5_-_modules_and_development/reference/module_config.xml 在这个网站上没有完整的信息 你能解释一下我写的东西吗................................................ .....................

<blocks>
        <helloworld>
            <rewrite>
                    <helloworld>M4U_HelloWorld_Block_HelloWorld</helloworld>
             </rewrite>
        </helloworld>
 </blocks> 
    </global>



   <frontend>
            <routers>
                    <helloworld>
                            <use>standard</use>
                            <args>
                                  <module>M4U_HelloWorld</module>
                                  <frontName>helloworld</frontName>
                            </args>
                    </helloworld>
            </routers>
    <layout>
        <updates>
            <helloworld>
                  <file>helloworld.xml</file>
            </helloworld>
        </updates>
        </layout>
    </frontend>
<global>    
     <blocks>
            <helloworld>
                <rewrite>
                        <helloworld>M4U_HelloWorld_Block_HelloWorld</helloworld>
                 </rewrite>
            </helloworld>
     </blocks> 
</global>

这表示您正在覆盖 Helloworld 模块的块 Helloworld 块 class。这意味着每当调用此块 class 时,它将首先调用此 class M4U_HelloWorld_Block_HelloWorld 然后是 HelloWorld_Block_Hellword class.

<frontend>
            <routers>
                    <helloworld>
                            <use>standard</use>
                            <args>
                                  <module>M4U_HelloWorld</module>
                                  <frontName>helloworld</frontName>
                            </args>
                    </helloworld>
            </routers>
    <layout>
        <updates>
            <helloworld>
                  <file>helloworld.xml</file>
            </helloworld>
        </updates>
        </layout>
    </frontend>

路由器:使用此标记,您可以为模块提供前端名称,以便通过 url 访问。您已将 frontName 指定为 "helloworld"。 当您在浏览器中键入 www.example.com/helloworld 时,magento 会将控制权传递给 M4U_HelloWorld 模块的 class M4U_Helloworld_IndexController。

布局:此选项卡告诉 magento 系统您所有的处理程序和布局更新都写在 helloworld.xml 文件下。在这里,您可以将模板文件分配给您的块 class,并且可以告诉在客户访问特定操作时应调用哪个模板。

这是一个非正式的解释。完整的知识可以参考alanstorm.com/

在上面的xml文件中

<blocks>
        <helloworld>
            <rewrite>
                    <helloworld>M4U_HelloWorld_Block_HelloWorld</helloworld>
             </rewrite>
        </helloworld>
 </blocks>

此代码用于覆盖该块。查看详细信息here

<routers>
                    <helloworld>
                            <use>standard</use>
                            <args>
                                  <module>M4U_HelloWorld</module>
                                  <frontName>helloworld</frontName>
                            </args>
                    </helloworld>
            </routers>

这段代码涉及以下内容

<frontend>
        <routers>
            <mymodule>
                <use>standard</use>
                <args>
                    <module>PackageName_Mymodule</module>
                    <frontName>mymodule</frontName>
                </args>
            </mymodule>
        </routers>
    </frontend>

<frontend> 标签将告诉 Magento 有关调度的控制器。在 <frontend> 标签内,我们定义了 <routers> 告诉 Magento 如何通过路由机制访问我们的控制器。

<mymodule>标签中,我们在<module>标签中定义了模块名称,在<frontName>标签中定义了前端名称。通过使用前端名称,我们可以在前端访问我们的模块,如

yoursitename.com/index.php/mymodule/index.

对于布局选项卡 here 是 alan strom 的精彩解释。

希望对您有所帮助。