Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Where is this code? 
 
john_wilson
Member
 
Total Posts:  35
Joined:  2007-09-20
 

Where is the code that is responsible for displaying the “My Wishlist” text link on the right side of the header?

I know that header.phtml has the following code

<?=$this->getChildHtml('topRightLinks')?>
Which I think displays both the “My Cart” link and the “My Wishlist” link together.  Should I be looking for a file called topRightLinks?  Should I be looking somewhere else?

Why are these two links put together like this anyway?  It would be much easier to separate them and move them around if they weren’t forced together like this.

Image Attachments
wishlist.gif
 
Magento Community Magento Community
Magento Community
Magento Community
 
jsperri
Sr. Member
 
Total Posts:  126
Joined:  2007-08-31
Fistufle
 

Have a look here: app/code/core/Mage/Wishlist/Block/Links.php
The first method addWishlistLink takes care of setting a different text for the link, depending on the number of items in the wishlist.

 
Magento Community Magento Community
Magento Community
Magento Community
 
john_wilson
Member
 
Total Posts:  35
Joined:  2007-09-20
 

That code seems to control what the link will display as, but I don’t think it controls whether the link displays or not.

I’m not sure, but I think the file I need to be looking at is top.links.phtml which is in app/design/frontend/default/default/template/page/html/

I can’t make any sense of the code in that file though, here it is:

<?if($toplinks && is_array($toplinks)): ?>
<ul>
    
<?=$this->getChildHtml()?>
    <?foreach
($toplinks as $_toplink):?>
    
<li<?if($_toplink['first']||$_toplink['last']):?> class="<?if($_toplink['first']):?>first <?endif;?><?if($_toplink['last']):?>last <?endif;?>"<?endif;?> <?=$_toplink['liParams']?>>        <?=$_toplink['beforeText']?><a <?=$_toplink['aParams']?>><?=$_toplink['innerText']?></a><?=$_toplink['afterText']?></li>
    
<?endforeach;?>
</ul>
<?endif;?>

Is this the right file to be looking at?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top