View Full Version : DW template - how to update links in documents based on that template?

12-26-2007, 12:52 PM

I have made a design and saved it as a template in Dreamweaver. I have put in some editable regions, and saved a copy of the document as a normal html file. Now, what i have understood is that, any document based on that template should get the links updated when you make a change in the template. That doesn't happen. How are you meant to save it and how will i get it to work?

Obviously i want the template to work for things like the navigation, footer and header and stuff like that.

Oh, and I am using DW CS3..

12-26-2007, 05:33 PM
Hello Sofie,
I'm not sure but I think you have to "define" your site. Look that up in DW help.

A better way for doing this might be php include. That's how I do it.

12-26-2007, 07:56 PM
I agree with excavator, PHP includes or SSI work best and DW templates are a big of an annoyance in practical web design. So what I would do is to take the HTML version of your file and split it up into different files. Find the point in the code where from <html> to the first part of the page you plan on changing from page to page and cut it from the main page into a file called header.html. All of the code in this page should be stuff you won't change from page to page, and then you make another file called page.php, and use <?php include("header.html"); ?> to bring it into that file. You have to have PHP installed on your server and probably won't work on your local computer, so test it on a server. You can do the same thing for any blocks of code that apply to the entire site (sidebar.html, footer.html) and if you changed anything in those files it would be reflected sitewide. DW templates are a pain, in fact I believe what I suggest will also help make better pages with finer control over the details and help people learn to code better.

12-27-2007, 12:30 PM
Thank you both!

I'll look up "define" site to see what it says...

I know I can do it with php but I sort of thought it would be really easy with Dreamweaver. Before i go for php I will probably try a bit harder with the template thing. But if not I'll probably will post here again..