Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

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?
 
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...
 
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
 
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.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.