Updating Pages Help

Discussion in 'HTML & Website Design' started by wd_2k6, Dec 10, 2007.

  1. #1
    Hi,
    I want all the pages on my site to have the same content in the left nav bar, header and right nav bar.
    Is it possible to link to these externally somehow, because i need it so that say i change some information in the left nav bar it will update it on all the pages?
    Otherwise i have to go and update every page on the site individually :confused:
    can anybody enlighten me on this, many thanks in advance
     
    wd_2k6, Dec 10, 2007 IP
  2. creative4w3

    creative4w3 Active Member

    Messages:
    105
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #2
    This is probably the easiest way for a beginner to do it:
    http://httpd.apache.org/docs/1.3/howto/ssi.html

    The most used is probably a PHP include, which you can check out php.net or search Google for an unlimited amount on that.

    Both ways are really simple and straight-forward.
     
    creative4w3, Dec 10, 2007 IP
  3. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Depending on your server's technology either an include file or master file is the normal way to do what you are wanting so that you have a single place to edit for all pages that include it
     
    AstarothSolutions, Dec 10, 2007 IP
  4. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #4
    OK Thankyou very much for your help it's worked like a charm.

    Just a couple of queries, should my pages now all be renamed to .php as this is what i have done. Is there any well known disadvantages to doing this (having .php instead of .html)

    Also last query will the use of php includes increase the loading time of my page?

    Many Thanks for your responses its really appreciated.
     
    wd_2k6, Dec 13, 2007 IP
  5. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The only disadvantage of any file extension other than .html is that if most people try and "guess" an address they are most likely to use .html. Other than that there is no disadvantages at all.

    What there will be an issue with is going from .something to .somethingelse if your site is already live and linked to/ indexed then these will be dead. If it is a new site, no problem, if it is established I would suggest that you dont rename them .php but instead push the .html through the PHP engine which is done by making an amendment to the .htaccess file.

    Yes, technically it will slow pages down as the server is having to pull the files together before it serves them up however unless your server is under a terrible load then the speed difference will be unnoticeable.
     
    AstarothSolutions, Dec 13, 2007 IP
    wd_2k6 likes this.
  6. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks for the help its really appreciated.
    Yes its a new site so it won't be a problem, glad i found this out now as it will save me a lot of wasted effort!!
     
    wd_2k6, Dec 13, 2007 IP
  7. BlueEew

    BlueEew Well-Known Member

    Messages:
    2,434
    Likes Received:
    79
    Best Answers:
    1
    Trophy Points:
    150
    #7
    You should always use includes so you don't have to go through like 400 pages to change on left menu. :) You can also use PHP, its a lot better. However SSI is good enough. ;)
     
    BlueEew, Dec 13, 2007 IP