4

How To Set Font Awesome Icon in Magento Top Links? In Magento Customer.xml

app\design\frontend\mytheme\default\layout\customer.xml

enter image description here

3
  • You could add class's to each link and then assign that way.
    – andy jones
    Dec 20, 2016 at 11:41
  • but how to add that, and what is the proper way,that i don't know, Dec 20, 2016 at 11:42
  • i have use <block type="wishlist/links" name="wishlist_link"> <action method="setBeforeText"> <beforeText><![CDATA[<i class="fa fa-gift"></i>]]> </beforeText> </action> Dec 20, 2016 at 11:45

2 Answers 2

2

I think this would work. For magento 1 anyway.

In your layout file:

<reference name="wishlist_link">
    <action method="setAParams">
        <param><![CDATA[class="fa fa-icon"]]></param>
    </action>
</reference>
2
  • OP's magento is 1 not 2. Dec 20, 2016 at 12:33
  • Apologies i thought it was 2. I have altered for mage 1
    – andy jones
    Dec 20, 2016 at 12:49
2

I Get Solution In header.php Like..

<div class="submenu">                               
<ul class="submenu-link">
<li><a href="<?php echo $this->getBaseUrl()?>customer/account" ><i class="fa fa-user"></i> My Account</a></li>
<li><?php echo ucfirst($this->getChildHtml('minicart_head')); ?></li>
<li><a href="<?php echo $this->getBaseUrl()?>wishlist" ><i class="fa fa-heart"></i> Wishlist</a></li>
<li><a href="<?php echo $this->getBaseUrl()?>checkout" ><i class="fa fa-crosshairs"></i> Checkout</a></li>
<li><a href="<?php echo $this->getBaseUrl()?>checkout/cart" ><i class="fa fa-shopping-cart"></i> Cart</a></li>
<?php if (Mage::helper('customer')->isLoggedIn() ): ?>
<li><a href="<?php echo $this->getBaseUrl()?>customer/account/logout"><i class="fa fa-sign-out"></i> Logout</a></li>
<?php   else: ?>
<li><a href="<?php echo $this->getBaseUrl()?>customer/account/login"><i class="fa fa-sign-in"></i> Login</a></li>
<?php endif; ?>
</ul>                           
</div>

enter image description here

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.