Friday 29 July 2011

Magento Referencing images in the CMS

Referencing an image in the Skin's images Folder
If you want to reference an image in your skin folder, in a page in magento (created using the CMS), use this bit of code in the "src":

{{skin url='images/image.gif'}}

example:
<img src="{{skin url='images/image.gif'}}" alt="alternate text" />

Referencing an image in the Media Folder
If you want to reference an image in the media folder, in a page in magento (created using the CMS), use this bit of code in the "src":

{{media url='images/image.gif'}}

example:
<img src="{{media url='image.gif'}}" alt="alternate text" />

No comments:

Post a Comment