Reorder/rename top right "quick-access" links in magento 1.5

Posted on 2011-10-27
Last Modified: 2013-11-18

I have inherited a magento website and which i need to make some minor amends on.

I am struggling to find out exactly here within the source or magento back end that i edit the top right menu links. When viewing source they appear to be in a block called "quick-access", i have found a file in LAYOUTS that outputs those tags, but it appears to call in Quick links?

Im assuming these are set in the back end somewhere, but i cant find out where.

I need to rename them and also reorder them. Any suggestions?

In order to access the site you must add this line to your HOSTS file:

Thanks in advance

Question by:Dean OBrien
    LVL 12

    Accepted Solution

    These links are added via the layout xml files located in your theme.

    Template file controlling it is:

    This file mainly loops through the links and prints them out.

    Block class controlling them is:
    SEE the AddLink Method.

    To add or adjust the links you need to look into the layout files.
    EX: The my account link, which you have relabeled as my A&M, is added from /app/design/frontend/YOURTHEME/YOURTHEME/layout/customer.xml
    In that file you will see the following code.

            <!-- 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>

    Open in new window

    This is what adds the link. To add your own you just need to mimic the code above, but change the variables to fit your needs.

    You can also update the code to adjust the position. Notice for the customer account link the position is set to 10.

    Hope that helps!
    LVL 12

    Author Comment

    by:Dean OBrien
    First of all thanks for a very comprehensive answer, i now understand how that all works and have a good grasp of how to proceed.

    One small question though... as you pointed out this is the line that renames the my account menu item:

    <action method="addLink" translate="label title" module="customer"><label>My a and m </label><url helper="customer/getAccountUrl"/><title>My</title><prepare/><urlParams/><position>20</position></action>

    You will notice that it doesnt use the ampersand, yet the ampersand displays on the page. Any ideas how this is done? I know that its definitely the correct line, because if i replace the "m" for a "t", then the menu goes from:
    "a&m" -> "a and t"

    I have a complete copy of all files on my computer, and have tried searching all files for the string "a&m" but it doesnt find it... i had originally though an if statement in the method might make the switch.

    Reason i ask is that i want to add a poun sign in one of the menu items and i need to replicate the method.

    LVL 12

    Expert Comment

    It looks like there are some wierd tags used, cufon, This is probably doing it, or has something to do with it.
    Looks like there is something similar to sIFR running on the site.

    CHeck the template file for custom logic: /app/design/frontend/YOURHTHEME/YOURTHEME/template/page/html/top.links.phtml
    LVL 12

    Author Comment

    by:Dean OBrien
    There is definitely cufon replace running, but i dont think it is related.

    I searched the entire magento file set and the only references to a&m are in the cache folder:
    line:a:2:{s:17:"Mage_Customer::My";s:6:"My a&m";s:26:"Mage_Customer::My a and m ";s:6:"My a&m";}

    Given that it doesnt appear anywhere else im assuming this must be set in the database?

    Checking now

    LVL 12

    Expert Comment

    I am 99.99999% sure that this data is not stored in the database.
    Check all the files listed in my first post for logic to replace "My a and m" with "My a & m".

    str_replace is probably used to do it.
    LVL 12

    Author Comment

    by:Dean OBrien
    Found it :)

    Searched the db dump and found this:
    core_translate` VALUES (1,'Mage_Customer::My',0,'My a&m','en_US')

    Looks like the sole purpose of this table is for substituting strings etc, imagine it woiuld be used for swear words or something...

    Thanks again for the help.

    LVL 12

    Expert Comment

    ah.. good to know. I did not know that existed. Thanks for posting that.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    I recently read an article which suggested that 60% of businesses in the U.S. that process credit card details online in order to accept payment for goods or services were not Payment Card Industry security standards (PCI) compliant. This statement …
    Often people are aiming at development of perfect Magento websites. Though, it is easier said than done. You know what’s much easier? To ruin everything. It can be done in seconds. Many of us experimented with design, tried to change some values dir…
    Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now