Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2005
    Location
    Spain
    Posts
    105
    Thanks
    9
    Thanked 0 Times in 0 Posts

    DW template - how to update links in documents based on that template?

    Hi,

    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..
    Last edited by Sofie; 12-26-2007 at 11:54 AM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    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.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #4
    Regular Coder
    Join Date
    Jun 2005
    Location
    Spain
    Posts
    105
    Thanks
    9
    Thanked 0 Times in 0 Posts
    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..


  •  

    Posting Permissions

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