How do I save time on updating my website with new pages ?

Discussion in 'HTML & Website Design' started by Raynor152, Jan 28, 2008.

  1. #1
    Forgive me I am relatively new to website biulding. So let's say I am making a website for whatever and I need to set a up a navigation menu or something. And after that is done I need to ad another page to my website. I would take the new link code and add it on to every page that I already have. This would be easy if my site had 5 pages but what if it had 100 pages ? How do I automate the proces ? How do I organize my websites page and make sure updating (new pages or erasing other pages) is not a big time consumer ?
     
    Raynor152, Jan 28, 2008 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There are two routes that people normally take, either have the navigation in a separate file and then use it as an include on all your pages so that you only have to update it once and all pages then have the update.

    Alternatively use a CMS type system which automatically updates the navigation each time a page is added/ removed
     
    AstarothSolutions, Jan 28, 2008 IP
  3. LeetPCUser

    LeetPCUser Peon

    Messages:
    711
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you server allows for PHP create a header.php and footer.php.

    The code would be:

    header.php
    
    <html>
     <head>stuff in here...</head>
    
     <body>
      Navigation and header stuff...
    
    Code (markup):
    footer.php

    
      footer stuff...
     </body>
    </html>
    
    Code (markup):
    index.php

    
    <? include("header.php"); ?>
    
    <p>Welcome to my awesome site.</p>
    
    <? include("footer.php"); ?>
    
    Code (markup):
     
    LeetPCUser, Jan 28, 2008 IP
  4. themasterplan

    themasterplan Peon

    Messages:
    83
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I agree with LeetPCUser, using includes is the best way to go. You upload the header, the footer, the sidebar o whatever you have once, and that action updates all of the pages.
     
    themasterplan, Jan 28, 2008 IP
  5. TechnoGeek

    TechnoGeek Peon

    Messages:
    258
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    For making dynamic sites so that you update a header file and all pages get updated, you have two options. One was already explained and is using PHP. Each page has the extension 'php'.

    The other option is to use SSI includes. Each page has the extension 'shtml'. To include a header file, you will use this syntax.

    <!--#include file="included.html" -->
    Code (markup):
    If you want to avoid the overload of having a dynamic site where each page is created on-the-fly, you may use an automated system that rebuilds the whole site at home, and send everything via FTP. You spend a little more time in updating, but your visitors get their pages quicker. This is feasible for small sites up to about 200 pages.
     
    TechnoGeek, Jan 28, 2008 IP
  6. Raynor152

    Raynor152 Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #6
    Thx for the advice :) I will use it. Is the php method 100% ... safe ? I wont loose like a few % of my visitors by making all my pages 100% php ? I just don't big websites with lots of pages using all php.
     
    Raynor152, Jan 29, 2008 IP
  7. fairuz.ismail

    fairuz.ismail Peon

    Messages:
    232
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #7
    of course it's safe.. in fact, almost all the "good" websites are built using PHP or ASP (it's similar with PHP but for windows server)..today, static websites are dead, people love dynamic more. good luck.

    you can start learning php at w3schools.com
     
    fairuz.ismail, Jan 29, 2008 IP
  8. cpufreak3

    cpufreak3 Well-Known Member

    Messages:
    346
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #8
    I think he meant compatibility terms. PHP is server side so your viewers will not have any problem with PHP pages.
     
    cpufreak3, Jan 29, 2008 IP
  9. hav0k

    hav0k Active Member

    Messages:
    178
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #9
    He pretty much nailed it on the head... here is some more information on the include function: http://www.tizag.com/phpT/include.php

    You might also want to check out using Wordpress... it's a great way to automate your entire site without bothering to learn PHP.
     
    hav0k, Jan 29, 2008 IP
  10. jezzz

    jezzz Notable Member

    Messages:
    4,884
    Likes Received:
    190
    Best Answers:
    0
    Trophy Points:
    200
    #10
    Yeah! it looks far easier than all surely will try in my fan sites :)
     
    jezzz, Jan 29, 2008 IP
  11. Raynor152

    Raynor152 Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #11
    It won't load slower or something show up screwed in other browsers, right ? Just had to ask :p

    Is'nt wordpress just for blogs ?

    While I am on the subject of organizing my website, I have to ask before I begin building it. How do I manage my ads ? There will be 2 spaces for ads on each page. Thats a lot of ads and if I want to change advertisers or decide to ad another 3-d space or something that take a lot of work. Can I use the include tag to place my ads in a separate file ? Would that make any problems I can't think about now ? :) How do you manage all your ads ? Oh, and if I want to display ads from 2 separate advertisers, how do I do that ? Say 40% adsense and 60% another advertiser and can I have some kind of analisys software or script to tell me what is going on, which is doing best ?

    Boy, I have a lot of questions :) Thx all for your help.
     
    Raynor152, Jan 30, 2008 IP