我可以添加自定义链接,例如 http://google.com/这段代码:
<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>
此代码来 self 在 Magento 中的主题的 customer.xml
提前致谢
最佳答案
是的,你可以。将此代码添加到主题的 local.xml 中的 <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>
附:<target>
添加到在新选项卡中打开链接。
关于php - 将自定义链接添加到顶部链接 Magento,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37560326/