1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

unified mast head

Discussion in 'Web Design & Development' started by lightnb, Jan 2, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. lightnb

    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
     
  2. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,786
  3. lightnb

    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?
     
  4. Rockn

    Rockn

    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.
     
  5. brendandonhu

    brendandonhu

    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.
     
  6. lightnb

    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
     
  7. lightnb

    lightnb Thread Starter

    Joined:
    Jun 16, 2002
    Messages:
    786
  8. brendandonhu

    brendandonhu

    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
     
  9. namenotfound

    namenotfound

    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)
     
  10. lightnb

    lightnb Thread Starter

    Joined:
    Jun 16, 2002
    Messages:
    786
    can It put it in a table?
     
  11. lightnb

    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
     
  12. Sponsor

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 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/430392

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice