- Amin Amini
Total Posts: 67
I’ve been looking for where Magento pulls the information to create the top links. The template file “links.phtml” uses the function getLinks(). That function in the file “links.php” simply returns the array “$_links”.
In what file is the $_links array filled with the default links?
Top links are specified in several layout files, i.e. the files in the app\design\frontend\default\default\layout directory, and added to the block called top.links, which is defined in the file fileapp\design\frontend\default\default\layout\page.xml. To actually find out in which files where links are assigned to top.links, you’ll have to search all of the files in the directory fileapp\design\frontend\default\default\layout\ for top.links. Check, for instance, wishlist.xml and the <default> layout handle and you should see something like this:
The code above could be read as: to the block called top.links, add data from the method addWishlistLink, which is located at wishlist/links.
<block type="wishlist/links" name="wishlist_link">