View Full Version : My html template
Goober
08-16-2003, 07:20 AM
im and trying to create a web template that i can open different files into it so i won't have to create multiple pages using the same layouts (kind of like the way you have diferent content pages open in frames but with out using the frame method)
sorry im having trouble finding a way to describe my problem, so if you need me to rephrase, i will do my best, and really appreciate the help.
thanks!!
aaron burch
MotherNatrsSon
08-16-2003, 07:27 AM
I think what you are looking for is a server side language like php asp or a a minimum server side include or perl to be able to insert multiple diles into a "template".
MNS
Goober
08-16-2003, 07:51 AM
well could i use php to solve my problem while using an html template? how will i get this all to work?
Nightfire
08-16-2003, 02:33 PM
Easiest way would be to split the html page up into sections, for example:
<html>
<head>
<title>My site</title>
</head>
<body>
<p>This is some text</p>
</body>
</html>
<?php
// this is header.php
?>
<html>
<head>
<title>My site</title>
</head>
<body>
// this is footer.php
</body>
</html>
Then in your pages you'll have
<?php
// this is index.php
include("header.php");
?>
<p>Here is some text</p>
<?php
include("footer.php");
?>
Now on every page, just use includes to include the header and footer.
Goober
08-17-2003, 06:23 AM
hey i think im finally getting it, thanks for all the help, i'll let you guys know if im having more trouble
Goober
08-17-2003, 08:21 AM
im sorry but i have another question. when you wrote:
// this is footer.php
</body>
</html>
wouldn't it be more like this?:
<?php
// this is footer.php
?>
</body>
</html>
Nightfire
08-17-2003, 08:24 AM
Yeah, that's right :) You can just delete the comment though, it's not needed :)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.