0

I want to remove My Tags link from sidebar in my account page without changing in base files.

How can I do it?

enter image description here

4
  • can you please give us screen shot..
    – Amit Bera
    Jun 23, 2015 at 10:17
  • you want to My tag link for left panel..
    – Amit Bera
    Jun 23, 2015 at 10:23
  • I want to remove My tags link from left sidebar.
    – Elham Gdz
    Jun 23, 2015 at 10:23
  • i had give you step by step process.please follow it Jun 23, 2015 at 10:36

1 Answer 1

2

Create a small module to do it:

Step 1) Create file Prasan_Customerlinks.xml at app\etc\modules:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Prasan_Customerlinks>
            <active>true</active>
            <codePool>local</codePool>
        </Prasan_Customerlinks>
    </modules>
</config>

Step 2) Create Navigation.php at app\code\local\Prasan\Customerlinks\Block\Account\

<?php

class Prasan_Customerlinks_Block_Account_Navigation extends Mage_Customer_Block_Account_Navigation {

    public function removeLinkByName($name){
        unset($this->_links[$name]);
        return $this;
    }
}

Step 3) Create file config.xml at app\code\local\Prasan\Customerlinks\etc\

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <global>
        <blocks>
            <customer>
                <rewrite>
                    <account_navigation>Prasan_Customerlinks_Block_Account_Navigation</account_navigation>
                </rewrite>
            </customer>
        </blocks>
    </global>
</config>

Step 4) Then in your local.xml file add following code.if local.xml file is not present create at app/design/frontend/yourpackage/yourtheme/layout/

<customer_account>
    <reference name="customer_account_navigation">
        <action method="removeLinkByName"><name>tags</name></action>
    </reference>
</customer_account>

P.S. For more information you can check my post on my blog http://pradeepsanku.com/2015/06/17/remove-customer-account-navigation-links-using-layout-xml-magento/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.