I want to remove the login url from the header, but magento won't budge. In the local.xml file I have the following code:
<reference name="top.links">
<action method="removeLinkByUrl"><url helper="customer/getLoginUrl"/></action>
</reference>
开发者_开发知识库
After a little debugging I found that the login url is added AFTER it is "removed" (customer.xml:75 of the base/default theme.
How can I change the order in which layout updates are processed? Surely the local.xml is supposed to override just about anything?
edit: Just to be clear, I am building a theme, so editing existing files is not an option for me.
You'd think that, but it gets tricky. You didn't mention it in your post, but what handle tag are you putting your reference tag in? The base custoemr.xml file that adds the customer/getLoginUrl is run from the customer_logged_out handle. Even if your code's in local.xml, if it's in a default handles or full action name handle, it will run after the code in catalog.xml because local.xml only wins on a per handle.
If that didn't make sense, just add this to your local.xml and you should be good to go.
<customer_logged_out>
<reference name="top.links">
<action method="removeLinkByUrl"><url helper="customer/getLoginUrl"/></action>
</reference>
</customer_logged_out>
加载中,请稍侯......
精彩评论