Editing multiple pages at once?

Discussion in 'Web Design and Development' started by Macnoviz, Jul 24, 2007.

  1. Macnoviz macrumors 65816

    Macnoviz

    Joined:
    Jan 10, 2006
    Location:
    Roeselare, Belgium
    #1
    Hi, I have a pretty good working and looking website, but now that my number of pages is growing, I find it very hard to make big changes in the code.
    Is there a way to build my websites in a way that I can change multiple pages at once?
    I have tried Dreamweaver templates, but that's quite an ordeal, and server-side includes also don't seem like the perfect solution.
    What do you guys advise to make this possible?
     
  2. Mitthrawnuruodo Moderator emeritus

    Mitthrawnuruodo

    Joined:
    Mar 10, 2004
    Location:
    Bergen, Norway
    #2
    Most text editors can, in one form or another, do search and replace over multiple files... i've done this with TextWrangler lots of time.

    But if this is usual header, footer and/or menu changes to a whole site I would recommend you to reconsider and try to check out templates or server side include files (php) again...
     
  3. rkking2004 macrumors newbie

    Joined:
    Jul 25, 2007
    #3
    Hey,

    I used dreamweaver to change multiple pages at once.

    You go to edit, and select find and replace, then select from the drop down menu in find in:entire current local file.

    In the box next to find, type what it is you want to change, and in the bob :replave, type what the change is.

    next click find all, after it find all the file/ codes that you want to chage, then click replace all, that's it

    finalvideoproduction.com
     
  4. Matteh117 macrumors regular

    Joined:
    May 24, 2007
    Location:
    Surrey, UK
    #4
    To be honest, an SSI would be the best bet.

    It's as simple as include('navigation.php'); for example in PHP. Really does help when you have parts of a website that can change frequently and appears on several pages.
     
  5. ppc_michael Guest

    ppc_michael

    Joined:
    Apr 26, 2005
    Location:
    Los Angeles, CA
    #5
    As others have stated, it's good (and extremely common) to use PHP to assemble your pages from multiple parts. So the PHP file would be something like

    include("header.php");
    include("body.php");
    include("footer.php");

    So then to change something in the header, you just edit the header.php file and it will be changed everywhere.

    Alternatively, if you have well-formed, well-structured (X)HTML, you can change a lot just through referencing a stylesheet.
     

Share This Page