Results 1 to 2 of 2

Thread: What order do you re-build your website, Is there a better way I wonder?

  1. #1
    Join Date
    Jun 2007
    Location
    Essex UK
    Posts
    18

    What order do you re-build your website, Is there a better way I wonder?

    Hi this is only a silly question but still you never know some one out there might just have a couple of tips to help out!!

    So Im re-doing my website (Im a novice and self taught but I get by) Im just finding this a really long process !

    So here is where I am, Ive done my new index page, and it has lots of link to pages through out the site (alot of which are not created yet) this top section will eventually be on the top of EVERY page,

    My plan is to create blank pages just so that I can get the link on the home page, then I will use this page to create all the following pages so that the links all carry across

    eg:

    Home > save as > Contact
    Home > save as > delivery
    .......................... returns

    etc

    is this the best route? or is there a better way? xx

    Many thanks boys and girls x

  2. #2
    Join Date
    Feb 2011
    Location
    Wiltshire, England
    Posts
    390
    The easiest way to do this is using PHP includes...

    So every page on your website will look a little like this:

    Code:
    <?php
    include("top.php");
    ?>
    <!-- Changeable content \/ -->
    
    This is the main content this can change for each page etc.
    
    <!-- End of changeable content -->
    <?php
    include("footer.php");
    ?>
    All you have to do then is put all the links etc to all the different pages inside the documents named in the the pages.

    TOP.PHP
    Code:
    <html>
    <head>
    <title>PHP Code can be used to change this depending on the page...</title>
    </head>
    <body>
    <div id="wrapper">
    <a href="page1.php">Page 1</a><br />
    <a href="page2.php">Page 2</a><br />
    <a href="page3.php">Page 3</a><br />
    <hr />
    <!-- This is the end of this file and where the document you include this file in will start... -->
    Then you can close the document with:

    FOOTER.PHP
    Code:
    <hr />
    This is my footer that is on every page I include this document on, if I want to change this for the WHOLE website all I have to do is edit the footer.php file and bob's your uncle, every page has the new footer.
    </div>
    </body>
    </html>
    If ever in doubt about a threads purpose report it and let webdev mods or admins be the judge. If we don't know we can't help.
    "Coffee is the saviour of mankind!"
    Web Design Wiltshire
    My Blog

Similar Threads

  1. I'd like to build a website like this...
    By 0chris0 in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 11 Nov 2010, 07:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •