Editing multiple pages at once?

Macnoviz

macrumors 65816
Original poster
Jan 10, 2006
1,059
0
Roeselare, Belgium
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?
 

Mitthrawnuruodo

Moderator emeritus
Mar 10, 2004
13,798
167
Bergen, Norway
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...
 

rkking2004

macrumors newbie
Jul 25, 2007
3
0
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?
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
 

Matteh117

macrumors regular
May 24, 2007
202
0
Surrey, UK
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.
 

ppc_michael

Guest
Apr 26, 2005
1,498
2
Los Angeles, CA
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.