开发者

How can i get the full path in local.xml file

Here is my code:

&开发者_Go百科lt;reference name="top.links">
   <action method="removeLinkByUrl"><url>checkout/cart</url></action>
</reference>

Here how can i get full path of checkout/cart in <url></url>?


If you want to remove that link from the header of the whole site, I would just copy the checkout.xml layout file to my custom theme directory to override it, and comment/delete the line where it is added:

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

But if you really need to remove the link via removeLinkByUrl(), looking through the core code they usually do this:

<action method="removeLinkByUrl"><url helper="customer/getRegisterUrl" /></action>

Then there is a method called getRegisterUrl() in app/code/core/Mage/Customer/Helper/Data.php which looks like this:

public function getRegisterUrl()
{
    return $this->_getUrl('customer/account/create');
}

So if you need to get a URL for checkout/cart you could set up a custom Helper in a custom extension which does something similar.

I hope this helps! Good luck!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜