我正在尝试通过来自空白主题的 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 - 你的两个答案都帮助我解决了这个问题。 最佳答案 不幸的是,XML 标记名称与可变参数无关,重要的是参数的数量。您需要指定 afterText 之前的所有参数,包括 beforeText 。<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> <liParams/> <aParams>rel="nofollow"</aParams> <beforeText/> <afterText>click to login</afterText></action>关于magento-1.4 - magento 的 customer.xml 布局文件中的附加参数,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7321364/