0

I want to change url of register present in top menu but I am unable to find it. Link is rendered in topmenu.phtml which is calling

$this->getHtml('level-top em-menu-link');

I found getHtml method in magento base class but it is calling loadTemplate and rendering it. Where is the link stored actually ?

I even tried adding it to local.xml

    <default>

    <!-- Removes 'Log In' link - Default position: 60 -->
    <reference name="top.links">
        <action method="removeLinkByUrl"><url helper="customer/data/getRegisterUrl"></url></action>
    </reference>

</default>

but nothing happened. I can see a function named getRegisterUrl in customer/helper/data.php but even after making changes there it is still pointing to same url.

2
  • check your local.xml file location app/design/frontend/package/theme/layout/local.xml and modify there. Commented Dec 11, 2015 at 12:35
  • I tried it already. I have updated my question, please have a look. @QaisarSatti
    – Krrish Raj
    Commented Dec 11, 2015 at 14:08

1 Answer 1

1

You can change in layout file (customer.xml) at location app/design/frontend/<your_package>/<your_theme>/layout/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>
            <action method="addLink" translate="label title before_text" module="customer"><label>'Reg'ister</label><url helper="customer/getRegisterUrl" /><title>Register</title><prepare/><urlParams/><position>100</position><li/><a/></action>
        </reference>

    </default>
6
  • That part is already commented in the layout file
    – Krrish Raj
    Commented Dec 11, 2015 at 12:14
  • in customer.xml file? have you used RWD theme or any custom theme?
    – Abdul
    Commented Dec 11, 2015 at 12:15
  • Its a custom theme.
    – Krrish Raj
    Commented Dec 11, 2015 at 12:17
  • So please open comment and change register label and check affect in top menu or not
    – Abdul
    Commented Dec 11, 2015 at 12:18
  • I think it is called in base layout file app\design\frontend\base\default\layout\customer.xml
    – Abdul
    Commented Dec 11, 2015 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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