1

I'm trying to hard code social icons in

projectname/app/design/frontend/projectname/default/template/page/html/footer.phtml

The html

<a src="../">facebook</a>

What is the correct way to link the img file in the theme skin folder

skin/frontend/projectName/default/images/webicons/socialIcon.png

The problem is how do I link from the app folder to the skin folder?

Cisum Inas
  • 11,552
  • 11
  • 40
  • 55

2 Answers2

11
<img src="<?php echo $this->getSkinUrl('images/webicons/socialicon.jpg') ?>" alt=""/>

OR

<img src="{{skin url=images/webicons/socialicon.jpg}}" alt="" />

This will help you to get the proper image from skin folder.

I hope this will help you.

Girish Hosamani
  • 1,203
  • 12
  • 18
3
img src = "<?php echo $this->getSkinUrl('images/webicons/socialicon.jpg')?>"/>Facebook

The code above would get the URL of the file “your_image_name.jpg” placed in your skin directory. Code works for both front and backend purposes. Hope it helps.

saravanavelu
  • 494
  • 6
  • 13