Results 1 to 8 of 8
Thread: Headers & Footers
-
10-13-2002, 03:09 AM #1Web Hosting Guru
- Join Date
- Aug 2002
- Location
- Toronto, Canada
- Posts
- 286
Headers & Footers
I am currently using frames for my site www.nowdammit.com, It works ok, but I'd rather not use frames. What do you think about frames? Anyways, I would like to see some of your code for using headers & footers if possible. Is there a certain way of doing it that loads the fastest? My top frame does not require php, I am only using flash for the header.
Thanks,
Mattwww.prolinker.com - free automatic linking to your website
-
10-13-2002, 04:07 AM #2Junior Guru
- Join Date
- Sep 2002
- Location
- Dallas, TX
- Posts
- 205
I don't know about faster, but it's typically wise to use include_once() instead of include() so as to not accidentally include it twice...
justin 'at' abrogo.com
http://www.abrogo.com
Shared Unix Hosting
-
10-13-2002, 04:52 AM #3Combat Vet, prepper and author
- Join Date
- Sep 2002
- Location
- Phoenix area
- Posts
- 1,121
frames bad. css good http://hotwired.lycos.com/webmonkey/...l?tw=authoring
Learn survival/prepper information from a combat veteran at Graywolf Survival
-
10-13-2002, 10:03 AM #4ex-Aussie
- Join Date
- Aug 2000
- Location
- Tacoma, Washington
- Posts
- 9,576
Just use a server side include:
PHP Code:<!--#include virtual="head.html" -->
PHP Code:AddType text/x-server-parsed-html .html
Former Webhost... now, just a guy.
-
10-17-2002, 03:38 PM #5Newbie
- Join Date
- Mar 2002
- Posts
- 10
Generally frames = bad. For the site I'm building I am using a class which let's me use about 4 lines to create a page and all I need to do is plug in the content. This is probably more than you are looking for though. As has been said, a simple method is to just use includes:
page.php
PHP Code:<?php
@ include 'header.htm';
echo 'hello';
@ include 'footer.htm';
?>
Code:<p align="center">
Code:</p>
SeanSitePoint PHP Advisor - answering your PHP questions day and night!
http://www.sitepoint.com
-
10-18-2002, 01:38 PM #6New Member
- Join Date
- Oct 2002
- Posts
- 2
I agree with the fact that frames are bad. Most search engines will tell you that you shouldn't use them.
I recommend using css as much as you can to save on page size and then I use Macromedia MX templates for my pages. By creating template, I can edit one file and have it shove the changes to all of the other files that were based upon that one.
There is also ssi include. This also works well and I have used this on a few sites. The only complaint with that is you either have configure your web server to parse things other than shtm or shtml for ssi, or name your files like that. It is also not real easy to preview on your local machine.
jared
-
10-18-2002, 03:39 PM #7ex-Aussie
- Join Date
- Aug 2000
- Location
- Tacoma, Washington
- Posts
- 9,576
Originally posted by jnyost
The only complaint with that is you either have configure your web server to parse things other than shtm or shtml for ssi, or name your files like that. It is also not real easy to preview on your local machine.
The preview issue can be a bother though, if you're not using Dreamweaver (which uses a 'render engine' to show parsed pages in preview). You just need to use some lateral thinking
Greg MooreFormer Webhost... now, just a guy.
-
10-19-2002, 07:42 AM #8WHT Addict
- Join Date
- Apr 2002
- Location
- Cornfield
- Posts
- 131
I find it's better to actually write your header and footer as a PHP function, so you can pass information to it that can change its appearance.
Fire extinguisher extraordinare
-------------------------------
FastServers.Net NOC Admin