I want to change the text of My account top links.

When user is not logged in, I need to display the top link My Account as Register.

Once a user is logged in, I want to change that text to from Register to 'Your account'.

How can I achieve this ?

Please Help.


1 Answer 1


As mentioned before you can edit your local.xml file. It should be in your theme folder e.g.: app/design/frontend/yourpackage/yourversion/layout/local.xml If it´s not there you can create it. It`s a very good way to edit the layout xml for a theme.

Remove "My Account" for the default handle

    <reference name="top.links">
        <action method="removeLinkByUrl">
            <url helper="customer/getAccountUrl"/>

Add "Register" for the logged out handle

    <reference name="top.links">
        <action method="addLink" translate="label title">
            <url helper="customer/getLogInUrl"/>

Add "My Account" for the logged in handle

    <reference name="top.links">
        <action method="addLink" translate="label title">
            <label>Your Account</label>
            <url helper="customer/getAccountUrl" />

In app/design/frontend/base/default/layout/customer.xml you can find the possible handles and url helper etc.

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.