Magento:如何将顶部链接移至导航块?
我试图弄清楚如何将顶部链接(我的帐户、登录、结账等)移动到包含类别名称列表的导航块中。我正在使用 Magento 1.4.2。这是一个屏幕截图来显示我的意思:
http://img839.imageshack.us/img839 /4043/11404620.jpg
目前我相信顶部链接位于链接块中。我想通过向 local.xml 添加一些 xml 来实现此目的,以便将来可以更轻松地升级。到目前为止,我只能用以下方法删除 top.links:
<reference name="header">
<remove name="top.links" />
但我不知道如何将它们添加到导航块中。希望一旦我知道如何做到这一点,我会更好地理解 Magento,它的布局方面让我感到困惑。感谢您抽出时间。
I am trying to figure out how to move the top links (My Account, Login, Checkout, etc) into the nav block that contains the list of category names. I'm using Magento 1.4.2. Here is a screenshot to show what i mean:
http://img839.imageshack.us/img839/4043/11404620.jpg
At the moment i believe the top links are in the links block. I'd like to achieve this by adding some xml to local.xml so that i can upgrade more easily in the future. So far i've only been able to remove the top.links with this:
<reference name="header">
<remove name="top.links" />
but i have no idea how to add them to the nav block. Hopefully once i know how to do this i will understand Magento better, the layout aspect of it has me confused. Thanks for your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
导航块直接从类别生成。您可以在导航块本身内重新创建布局 XML,但在生成目录类别后,您需要修改导航 PHTML 本身以包含顶部链接。
请记住,这通常是一个较差的信息层次结构,这就是为什么它首先以这种方式构建的原因。
The nav block is generated directly from the categories. You can recreate the layout XML within the nav block itself, but you will need to modify the nav PHTML itself to include the toplinks after generating the catalog categories.
Keep in mind that this is generally a poor information hierarchy, which is why it is structured this way in the first place.