View Full Version : Need Help Replacing Logo Image in Includes File

11-21-2008, 04:35 PM

I'm using a template and need to replace the images. I've been able to replace all images except the Logo within the header.

The original template has this includes file:
<?php require_once('includes/header.php'); ?>

I selected the image, then clicked Edit in the Properties panel and replaced the old image with mine. However the change does not show on design view.

What am I doing wrong? Here's the header.php code after the change:

<div id="header">
<div id="header-container">
<div id="logo-container"><a href="#"><img src="../images/logo.jpg" alt="how to budget money" width="421" height="80" /></a></div>
<div id="search-container">
<form id="form1" name="form1" method="post" action="">
<input type="text" name="search" id="search" />
<input type="submit" name="button" id="button" value="Submit" />


11-21-2008, 04:59 PM
If you use DW to insert the link, then the path is going to be relative to the php include file you are editing.
However, you are including that file in another document, so the path needs to be relative to the document you are viewing.

11-21-2008, 05:39 PM
Hi Domedia,

After days trying to solve my problem, I found the solution.

I changed <img src="../images/logo.jpg"

to <img src="images/logo.jpg"

and that did the trick.

Thanks for your feedback.

11-21-2008, 05:44 PM
Glad you got it solved!
All you would have to do is look at the source of your page and see what the path should be. The path needs to be handcoded into your include file because the path should not be relative to your include file, but relative to your web document :)