我想更改顶部链接 在默认情况下设置magento显示
我的帐户 |我的愿望 list |我的购物车 |结帐 |登录
我需要更改顶部链接,仅在用户登录后才显示“我的帐户”链接
感谢帮助
最佳答案
在您的主题的 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>
</reference>
</default>
<customer_logged_in>
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
</reference>
</customer_logged_in>
将我的帐户链接从 default
标记删除到 Customer_logged_in
用
更改 customer.xml 后
<default>
<!-- Mage_Customer -->
<reference name="top.links">
</reference>
</default>
<!--
Load this update on every page when customer is logged in
-->
<customer_logged_in>
<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" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
</reference>
</customer_logged_in>
希望这一定会对您有所帮助。
关于magento - 我的帐户仅在登录后显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18528961/