add icon instead of label in link

485 views Asked by At

I'd written this code:

<action method="addLink" translate="label title" module="checkout">
    <label>Cart</label>
    <url helper="checkout/url/getCartUrl"/>
    <title>Cart</title>
    <prepare/>
    <urlParams/>
    <position>150</position>
</action>

But instead of the label Cart I want to show an image. How could I add image in the above xml code?

1

There are 1 answers

0
Mohammad Faisal On BEST ANSWER
<action method="addLink" translate="label title" module="checkout">
    <label>Cart</label>
    <url helper="checkout/url/getCartUrl"/>
    <title>Cart</title>
    <prepare/>
    <urlParams/>
    <position>150</position>
    <liParams />
    <aParams><![CDATA[ class="cart"]]></aParams>
</action>

This should add a class cart to the <a> element. You can add your css on that class that hides the text and displays an icon.