开发者

removing action from local.xml

开发者 https://www.devze.com 2023-03-09 05:23 出处:网络
开发者_StackOverflow社区How can i remove <action method=\"addCartLink\"></action> from local.xml. This code in customer.xml:
开发者_StackOverflow社区

How can i remove <action method="addCartLink"></action> from local.xml. This code in customer.xml:

    <reference name="top.links">
        <block type="checkout/links" name="checkout_cart_link">
            <action method="addCheckoutLink"></action>
            <action method="addCartLink"></action>
        </block>
    </reference>


There is a method on top.links called removeLinkByUrl that should do it for you. I haven't tested this, so you may need the full URL, but the gist is this:

<reference name="top.links">
    <action method="removeLinkByUrl"><url>checkout/cart</url></action>
</reference>

Hope that helps!

Thanks, Joe

0

精彩评论

暂无评论...
验证码 换一张
取 消