PDA

View Full Version : Having prob with template


knight76
02-14-2006, 12:49 AM
Hello all.

Firstly let me introduve myself. My name is Jason and im sort of new to website design. I currently manage a website at www.gtfalconpics.com. I did not provide the template for this site though.

I have recently volunteered to creat a website for a car club I am a member of. I have gotten upto the template stage and have saved a template complete how I want it to look.

My problem is the index page created from the template works fine, all the backgrounds are there and the links are active etc. But when I create a second page and link it from the index and test it the backgrounds dont show up for the second page. The writing and everything works and the general layout is fine. But the graphics and menu backgrounds arent there.

I cant work out why, The index page works fine, every other page dosnt. Ok,so ow for the code:

This is the code used in the template itself for the heading banner.

<tr>
<td><div align="center">/templates/banner%20demo.png</div></td>
</tr>

The strange thing is if I dont use it as a template it works fine, all the links work and the second pages have the graphics etc. As soon as I use it as a template it wont work.

Any help or suggestions?
Bare in mind I am very, very new to html etc, plain english please.

knight76
02-14-2006, 01:43 AM
So far ive only been testing this on my computer using the preview in browser. I just uploaded the index and one other page to show you guys and now the index is not showing any graphics etc at all. It was on my computer though. I did upload the template and graphics as well in the same folder structure as on my computer

Check it out at www.newcastlegtclub.com

Creative Insanity
02-14-2006, 02:18 AM
look at this
href="/events.htm">

This should be:
href="events.htm">

remove spaces from ALL FILE AND IMAGE NAMES Use a - or _ instead.

knight76
02-14-2006, 10:48 PM
Thanks for the tip but im still not able to get it to display properly.

I removed spaces and tried all variations on path to the file. I still cant get it to show the graphics and background.

The layout of the site online is

/public_html/ - for all the files
/public_html/templates - where my template files are including the graphivs files

My code for the template is as follows:

The files I am having trouble displaying are bannerdemo, bgside and bg.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Untitled Document</title>

<style type="text/css">
<!--
.style2 { font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
}
.style3 { font-family: Arial, Helvetica, sans-serif;
color: #000000;
font-size: 13px;
font-weight: bold;
}
.style19 {color: #000000}
-->
</style>

</head>

<body bgcolor="#FFFFFF" text="#FFFFFF" link="#023fcc">


<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" style="border-bottom: 1px solid #023FCC;">
<tr>
<td><div align="center">bannerdemo.png</div></td>
</tr>
</table>


<table width="950" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="165" height="613" valign="top" background="/bgside.png">

</p>


</p>
<table width="100%" height="183" border="0" style="border: 4px solid #ffffff;">
<tr>
<td height="68"><p align="center" class="style3"><font color="#000000">INFO</font> (info.htm)</p></td>
</tr>
<tr>
<td height="99" valign="top"><div align="center" class="style3" style="border-top: 4px solid #ffffff;">


</p>


<font color="#000000">EVENTS</font> (events.htm)</p>
</div></td>
</tr>
</table>
<table width="100%" height="183" border="0" style="border: 4px solid #ffffff;">
<tr>
<td height="68"><p align="center" class="style3"><a href="clubcars.htm"><font color="#000000">CLUB
CARS</font></a></p></td>
</tr>
<tr>
<td height="99" valign="top"><div align="center" class="style3" style="border-top: 4px solid #ffffff;">


</p>


<font color="#000000">CLASSIFIDES</font> (classifides.htm)</p>
</div></td>
</tr>
</table>


</p></td>
<td width="785" valign="top"><table width="98%" height="100%" border="0">
<tr>
<td width="80%" height="610" valign="top" background="/BG.png"><div align="center">
</div></td>

<td width="20%" valign="top" background="/bgside.png"><div align="left">




</p>


</p>


</p>


</p>


</p>
<table width="100%" height="38%" border="0" style="border-bottom: 4px solid #ffffff;">
<tr>
<td height="68"><div align="center">
<p class="style2 style19">Image of the Week </p>
</div></td>
</tr>
<tr>
<td height="99" valign="middle"><div align="center" style="border-top: 4px solid #ffffff;">


</p>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table> </td>
</tr>
</table>
</body>
</html>

domedia
02-15-2006, 12:53 PM
If your graphics is inside the templates folder, you need to include that in the path to your images. as in
templates/image.gif
But who told you to put the images in your templates folder? :)
Put them in something like public_html/assets/ then it's more organized ;)

knight76
02-15-2006, 02:34 PM
I did have that as the path originally, but I had it with a / at the start. So it was more like /templates/image.gif

would that make a difference?

I put those graphic files in the template folder just to keep em out of the way.

davidj
02-15-2006, 02:36 PM
I did have that as the path originally, but I had it with a / at the start. So it was more like /templates/image.gif

would that make a difference?


yes

remove the / (first slash)

knight76
02-15-2006, 03:13 PM
Ok, I changed the code as suggested above. Still wont show the images.

Any other suggestions?

domedia
02-15-2006, 03:36 PM
Can someone give knight76 a quick guide to how paths works? I think that's the only thing needed. I'm a bit busy right now :)

knight76
02-15-2006, 10:11 PM
I have tried several times. Apparently if the path is omitted and its just got the filename the file needs to be in the root directory of the website. Which I have also tried and no joy there either. For example

image.gif

Creative Insanity
02-15-2006, 10:44 PM
Ok dom here goes:

Ok your hoster will be simular to this for it's hosting paths:

/home/user_name/public_html or www/
It is in the www or public_html where your files go.
It is a good idea to layout your site with an image directory and also a directory for your other pages in a manner simular to this:

For your images:
/home/user_name/public_html/images/
and for your other pages:
/home/user_name/public_html/include/
and your index file go in:
/home/user_name/public_html/

Also when you build your site locally make sure you have in your site folder the images and include directories so that when you do your site the paths for images and links will be correct when you upload it to your server.

When a web browser views your site that will just for index page see:
URL.com/index.*
for images:
URL.com/images/
and for support pages:
URL.com/include/
So that means that your local development site can just be a site name folder with an images and include directory inside.
When you do a site it is good to plan for growth as this will happen, having a good file structure right from the start will be less hassles in the future.

knight76
02-16-2006, 01:10 AM
Thanks for the help with the path. I have got it working now.

Much appreciated.

Jason