Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / img src not showing image

img src not showing image

Locked

Views: 3,382

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
17 Feb 2009, 10:44 AM
#1
kiwi1066 avatar

kiwi1066

New Zenner

Join Date:
Jan 2009
Posts:
28
Plugin Contributions:
0

img src not showing image

Hi, I have been trying to work this out, I 'm sure its easy but it escapes me. Using ZC 1.3.8.
In tpl_header.php I have added the line
<img src="../../../images/header/blue.jpg" alt="blue"/>
This is just below the logowrapper div.
I am using Dreamweaver to do this and in the editor the image looks fine,

But when I view it in the browser all I get is the alt text "blue" in a little place holder box.

Why wont the image show in the browser :frusty:

17 Feb 2009, 11:15 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: img src not showing image

It doesn't show because you're trying to reference it from where the template file is located and not from where the file that ultimately includes the template (index.php in the site root) is located.

It does show in Dreamweaver because that doesn't know who Zen Cart works and makes the same erroneous assumption that the image will be used where the template is located.

This would probably work (in live though not in Dreamweaver) > <img src="images/header/blue.jpg" alt="blue"/>But better still would be > <?php echo zen_image('header/blue.jpg','blue') ?>(though that's not very helpful alt text)