0

OK i added a new top link to my header on homepage named 'Cash-On-Delivery'. Now i want to add an icon just before this link-its a small cart icon in .png format.

I added the COD top link by adding this code to customer.xml : (The customer.xml is located in app/design/frontEnd/base/default/layout/customer.xml)

<default>
<reference name="top.links">
<action method="addLink" translate="label title">
<label>Cash-On-Deliverya</label>
<url>terms</url>
<title></title>
<prepare>true</prepare>
<urlParams></urlParams>
<position>2</position>
<liParams/>
 <aParams>
 <class>cod</class>
</aParams>
<beforeText></beforeText>
<afterText></afterText>
</action>
</reference>
</default>

I then defined my 'cod' class in styles.css in skin/frontend/Des_Pckg/themeName/default/css/styles.css here it is:

.cod {
background: url(../images/cod-icon.png) no-repeat top left;
padding: 0 15px 0 30px;

}

i also tried:

li.cod {
background: url(../images/cod-icon.png) no-repeat top left;
padding: 0 15px 0 30px;

}

The icon cod-icon.png is placed in: skin/frontend/ThemeName/deafult/images.

Am I doing it the correct way?

1 Answer 1

0

Instead of

<aParams>
 <class>cod</class>
</aParams>

try <aParams> class="cod"</aParams>
aParams does not support subtags. it does not interpret the subtags you add as an array.

2
  • Its still not working. Jul 27, 2015 at 9:12
  • Its working now.i placed my css in a wrong file.Thanks a million :) Jul 30, 2015 at 11:04

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.