Your shopping cart is empty. Browse our Store

Magento

Open Source eCommerce Evolved

Magento Forum

   
Skin Images Location/Directory
 
aquiss
Jr. Member
 
Total Posts:  13
Joined:  2008-05-04
United Kingdom
 

I wonder if anyone can offer any input.

As part of our template design, I have added some custom images in the various template files, such as “1column.phtml” which are referenced in the normal html way within that file such as:

<img src="skin/frontend/default/default/images/footer_02.gif" width="165" height="39">
and also tried
<img src="images/footer_02.gif" width="165" height="39">

I have upload these images to “/skin/frontend/default/default/images/” which is the matching location on the server.

These files display fine within custom pages, such as the about us page, however as soon as you go into the catalog, they don’t display, and right clicking on images shows the path to the images is now different, which I presume is the rewrite rule kicking in.

What i would like to know is what is correct location to place custom images, and the exact img references I should be be using in files such as 1column.phtml and 3columns.phtml etc

Many thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chinesedream
Guru
 
Total Posts:  341
Joined:  2007-08-31
San Francisco, CA
 

Because the base urls is defined in the admin/configuration, so in the phtml file you need to ‘getSkinUrl’

<img src="<?php echo $this->getSkinUrl('images/footer_02.gif')?>” />

 
Magento Community Magento Community
Magento Community
Magento Community
 
aquiss
Jr. Member
 
Total Posts:  13
Joined:  2008-05-04
United Kingdom
 

Thanks chinesedream, perfect smile

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2008 Varien. Magento is a trademark of Irubin Consulting Inc. DBA Varien