【发布时间】:2011-09-06 14:14:36
【问题描述】:
我正在尝试通过来自空白主题的 customer.xml 文件(在 Magento 1.4.1.1 中)向顶级客户链接(我的帐户、我的购物车等)添加一些解释性文本
我认为 magento 通过发出 afterText 或 beforeText 参数具有开箱即用的能力,但是当我使用它们时,它似乎只会在链接之前推动东西(而不是之后,这就是我所追求的)。
这是来自 customer.xml 的摘录,其中包括附加的
<default>
<!-- Mage_Customer -->
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>Your Account</label><url helper="customer/getAccountUrl"/><title>Your Account</title><prepare/><urlParams/><position>10</position><null /><aParams>rel="nofollow"</aParams><afterText>click to login</afterText></action>
</reference>
</default>
以前有人遇到过这种情况吗? liParams 是否需要一些额外的参数?
提前致谢!
编辑:这是似乎对我有用的最终代码。请注意按照建议添加的额外字段 谢谢你,它有很大帮助。您和下面的@Zyava 回答都帮助我解决了这个问题。 上面的建议中缺少一个字段(innerText 字段)。我已经把完整的代码放在下面,看起来对我有用。希望它可以帮助别人!
<action method="addLink" translate="label title" module="customer">
<label>Your Account</label>
<url helper="customer/getAccountUrl"/>
<title>Your Account</title>
<prepare/>
<urlParams/>
<liParams/>
<aParams>rel="nofollow"</aParams>
<innerText/>
<beforeText>yourbeforetext</beforeText>
<afterText>youraftertext</afterText></action>
非常感谢@clockworkgeek 和@zyava - 你的回答帮助我度过了这个难关。
【问题讨论】:
标签: magento-1.4 magento