unified mast head

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

lightnb

Thread Starter
Joined
Jun 16, 2002
Messages
786
I have a mast head on every page (logo and navigation). I want to set it up so that the mast head and its associated code lives seperatly from the page it's self, that way if i add a link to it, all of the existing pages autoupdate to reflect the change.

how is this done?

thanks,

nick
 

lightnb

Thread Starter
Joined
Jun 16, 2002
Messages
786
I read through it, but can't seem to find what im looking for. I have an HTML file of the page layout that i want to dynamically glue to the top of every other html page. is there a way to stick an html document inside another one?
 
Joined
Jul 29, 2001
Messages
21,334
You are looking for server side includes (SSI). I am sure your host supports them if they support PHP.
 
Joined
Jul 8, 2002
Messages
14,681
You could do it in PHP using include_once() or require_once() to insert the file with the code you want on each page.
 

lightnb

Thread Starter
Joined
Jun 16, 2002
Messages
786
how does that work? I would like the logo and navagation buttons on<a href="http://www.rahlentertainment.com/livexchange/index.html">this</a> page dynamically inserted on every page in the site.

I can do HTML, but I'm not framiliar with php tags.

thank you,

Nick
 
Joined
Jul 8, 2002
Messages
14,681
Put
<?php
require_once('http://www.rahlentertainment.com/livexchange/index.html');
?>

in each page where you want that file included. You'll probably need to rename the page to .php
 
Joined
Apr 30, 2005
Messages
3,012
If you have an Appache server than you can configure it to render PHP scripts inside .html pages

Also, if you use require_once() then if the file ever fails to load, the whole page won't load.
With include_once() then if the file fails to load, the rest of the page WILL still load (it will just display a "warning" about the file that failed to load)
 

lightnb

Thread Starter
Joined
Jun 16, 2002
Messages
786
if the page name ends in a .php extension now, do i have to do something special when calling my CSS stylesheet?

I got the "glue-on" function to work, it's just ignoring the style sheet i assigned it.

thanks,

nick
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top