View Full Version : So I used a free template !!!
coldveins
December 20th, 2007, 22:27
Well Im just experimenting with one because im bored and it turns out that Im liking it. So I went to http://www.freewebsitetemplates.com and got me a template. I think its css. So anyway, Im gonna include a picture for you to help understand my question.
On the page you see how there are a row of links at top, to the left, and on the right. How do I make it so that when I click on say ( VIDEO ) on the left panel it will load that page in the main middle box ?
Must I keep copy and pasting the whole html and css files for every section and just change the information within that box on the index file ?
JohnN
December 21st, 2007, 07:12
no, either use php includes like this:
rename index.html to index.php, about.html to about.php ect...
then select the bit you want to appear on all the pages and cut it out of your files. create a new file called header.tpl. then on all your pages use this code
<?include_once('header.tpl')?> should work fine.
coldveins
December 21st, 2007, 09:49
OK so if I simply change the filenames to .php than the site will be in php ?
Are you saying the file that i will create called header.tpl will load all by itself kind of like an inline frame ? Thats what I want.
What is this <?include_once('header.tpl')?> ? within the .tpl file can i use html codes ? Will I need to target links ?
coldveins
December 23rd, 2007, 09:22
can I get a little help here ?
sep
December 23rd, 2007, 23:30
If what JohnN said sounds complicated, you should consider using framesets. Link: http://www.w3schools.com/tags/tag_frameset.asp
If framesets sound complicated, you should not be making a website.
coldveins
December 24th, 2007, 11:53
Yes I know how to use frames but If you look atthe picture above I want that design. I dont think its possibleto run frames and keep that design.
JohnN
December 24th, 2007, 14:29
its allways possible, just make sure what your doing is wrapped up neatly - eg in frame 1 dont have <div>content! make sure you have <div>content</div>
my method you can do whatever you want as all it basically does is merge documents.
if header has <html>
the main bit has <div>hi</div>
and the footer has </html>
it will ouput
<html>
<div>hi</div>
</html>
no need for targets, treat it as if its a full page.
to say its a site in php is a bit of a stretch of the truth, it uses a tiny bit of php.
you can use html as normal.
h0ster
January 1st, 2008, 20:58
If what JohnN said sounds complicated, you should consider using framesets. Link: http://www.w3schools.com/tags/tag_frameset.asp
If framesets sound complicated, you should not be making a website.
Framesets are being phased out, you'd need to use Transitional instead of Strict ;). I'm not sure why you'd use .tpl over .php either. I think you'd use .tpl if you weren't running PHP on your server, I can remember seeing it quite a lot in ye olden days.
To be honest I think you need to find some good tutorials and start learning or do what I do and a find a good freelancer, but i'm guessing that you'd want to learn. Try
http://lynda.com for some great tuts. you have to pay but it's more than worth it.
On another note, free templates may look quite nice but the code structure can often be appalling and confusing to learn from. You should always learn from the best source you can ;)
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.