【发布时间】:2013-10-04 16:04:14
【问题描述】:
我是 Magento 主题的新手,正在尝试做一些基本的主题更改。
我想在页眉和页脚中显示相同的 top.links 菜单。
我在 page.xml 的页脚中添加了块:
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
<block type="page/template_links" name="top.links" as="topLinks"/>
并将此代码添加到footer.phtml
<?php echo $this->getChildHtml('topLinks') ?>
执行此操作后,菜单显示在页脚中,但不再显示在页眉中。我猜一个块只能显示一次?如何在页眉和页脚都显示它?
谢谢。
【问题讨论】:
-
你可以在没有 xml 的情况下调用它。只需在页脚页面中调用此 getChildHtml('topLinks') ?>。
-
@K-THIHA - 我尝试了这个,但没有成功。只是想出了 DIV 中的任何内容。
标签: magento