添加自定义链接到顶级链接Magento [英] Add custom link to top links Magento

查看:82
本文介绍了添加自定义链接到顶级链接Magento的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以添加自定义链接,例如 http://google.com/ 到此代码:

Can I add custom link, like for instance http://google.com/ to this code:

<reference name="top.links">
    <action method="addLink" translate="label title" >
        <label>Your Label</label>
        <url ....../>
        <title>Your Title</title>
        <prepare/>
        <urlParams/>
        <position>100</position>
    </action>
</reference>

这段代码来自Magento主题中的customer.xml

This code is from customer.xml from my theme in Magento

预先致谢

Thanks in advance

推荐答案

是的,您可以。将此代码添加到您主题的local.xml中的< reference name =top.links>

Yes you can. Add this code in your theme's local.xml, under <reference name="top.links">

<action method="addLink" translate="label title">
    <label>Google</label>
    <url>http://google.co.in</url>
    <title>Google</title>
    <prepare/>
    <urlParams/>
    <position>80</position>
    <aParams>
        <target>_blank</target>
    </aParams>
</action>

PS:< target> 在新标签中打开链接。

P.S: <target> is added to open link in new tab.

这篇关于添加自定义链接到顶级链接Magento的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆