我已经查看了几个关于在Magento中创建自定义页脚的教程,但没有一个与添加默认页脚的链接有关。我想在"帐户"下添加一些链接。 Magento默认页脚的div。这是我在app / design / frontend / rwd / default / layout / customer.xml中的内容:
<default>
<!-- Mage_Customer -->
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
<action method="addLink" translate="label title before_text" module="customer"><label>Register</label><url helper="customer/getRegisterUrl" /><title>Register</title><prepare/><urlParams/><position>100</position><li/><a/></action>
</reference>
<reference name="footer_links2">
<action method="addLink" translate="label title" module="catalog"><label>My Account</label><url helper="customer/getAccountUrl" /><title>My Account</title></action>
<action method="addLink" translate="label title"><label>Customer Service</label><url helper="/customer-service/" /><title>Customer Service</title><prepare>true</prepare></action>
</reference>
</default>
答案 0 :(得分:0)
您可以使用以下代码在页脚中添加链接。您的代码几乎正确,但您在引用名称中出错,请确保引用名称为footer_links
<reference name="footer_links">
<action method="addLink" translate="label title" module="catalog"><label>My Account</label><url helper="customer/getAccountUrl" /><title>My Account</title></action>
<action method="addLink" translate="label title"><label>Customer Service</label><url helper="/customer-service/" /><title>Customer Service</title><prepare>true</prepare></action>
</reference>