【发布时间】:2011-10-27 06:41:04
【问题描述】:
我学习了 Magento Template 基础教程。有个问题让我很困惑。
查看 checkout.xml 中的这段代码。它告诉我系统将在 top.links 块中添加两个链接。
<reference name="top.links">
<block type="checkout/links" name="checkout_cart_link">
<action method="addCartLink"></action>
<action method="addCheckoutLink"></action>
</block>
</reference>
所以我在 page.xml 布局文件中找到了 top.links 块。我想知道这个块将使用哪个模板。但是这个标签中没有模板属性。所以任何人都可以告诉我为什么这里没有模板属性?如果是这样,Magento 怎么知道应该引用哪个模板?
<block type="page/html_header" name="header" as="header">
<block type="page/template_links" name="top.links" as="topLinks"/>
</block>
它告诉我们,header 块中有一个 top.links 块
【问题讨论】:
标签: magento