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

Change top.links from text to images
 
nielsvi
Jr. Member
 
Total Posts:  1
Joined:  2008-09-23
 

Can someone tell me if its possible to change the top.links (My Account, My Wishlist, My Cart, Checkout & Log In) to images?
I’ve been trying in boxes.css, header.phtml and top.links.phtml but its not working:(

 
Magento Community Magento Community
Magento Community
Magento Community
 
BigWil
Jr. Member
 
Total Posts:  16
Joined:  2007-10-17
 

No bites on this question huh? You’re right changing top.links.phtml does absolutely nothing and I haven’t been able to figure out why yet.  A little help anybody?

BigWil

 
Magento Community Magento Community
Magento Community
Magento Community
 
Anjanesh
Sr. Member
 
Avatar
Total Posts:  136
Joined:  2008-03-15
Mumbai, India
 

Maybe something like this will work :

In boxes.css, add a single background-image containing all your text links one below the other of constant height

shop-access li a { background-image:url('shop-access-links.gif'); }

And change top.links.phtml

<li<?php if($_toplink['first']||$_toplink['last']): ?> class="<?php if($_toplink['first']): ?>first <?php endif; ?><?php if($_toplink['last']): ?>last <?php endif; ?>"<?php endif; ?> <?php echo $_toplink['liParams'] ?><?php echo $_toplink['beforeText'] ?><a <?php echo $_toplink['aParams'] ?>><?php echo $_toplink['innerText'] ?></a><?php echo $_toplink['afterText'] ?></li>
to
<?php $i 0; foreach($toplinks as $_toplink): ?>
<li<?php if($_toplink['first']||$_toplink['last']): ?> class="<?php if($_toplink['first']): ?>first <?php endif; ?><?php if($_toplink['last']): ?>last <?php endif; ?>"<?php endif; ?> <?php echo $_toplink['liParams'] ?>>
<?php echo $_toplink['beforeText'] ?>
<a <?php echo $_toplink['aParams'] ?> style="background-position:0 <?php echo $i; ?>">
<?php echo $_toplink['innerText'] ?>
</a>
<?php echo $_toplink['afterText'] ?>
</li>
<?php $i+=20; endforeach; ?>
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top