【发布时间】:2014-10-13 11:15:51
【问题描述】:
我正在以这种方式在 Magento 中创建一个菜单:
<block type="page/template_links" name="footer_links2" as="footer_links2" template="page/template/links.phtml">
<action method="setTitle"><title>Main menu</title></action>
<action method="addLink" translate="label title" module="catalogsearch">
<label>About us</label>
<url helper="cms/page/getPageUrl"><pageId>3</pageId></url>
<title>About us</title>
</action>
<action method="addLink" translate="label title" module="catalogsearch">
<label>Contact us</label>
<url helper="cms/page/getPageUrl"><pageId>4</pageId></url>
<title>Contact us</title>
</action>
<!-- Other links here... -->
</block>
它有效,但我希望相同的菜单也出现在页面的不同部分,内容相同。有没有办法复制该块的输出,以便我可以在不复制代码的情况下显示它?
【问题讨论】:
标签: php xml magento layout template-engine