Dreamweaver 4.x Template Recovery!

Ever lost your template due to a system crash or a server crash and had to recreate it by hand from scratch?  There is a pretty easy method of recreating your template from a child page and this tutorial walks you through the process.

As you know, the child page has a reference to the original template and each editable region has a name and associated code.  This is common to each and every template in Dreamweaver 4, UltraDev 4 and Dreamweaver MX.

It's virtually impossible to fully recreate a Dreamweaver MX Template, however, you certainly can recreate the majority of the original template.  However, it is totally possible to recreate a Dreamweaver 4 or UltraDev 4 template in it's entirety.

CAUTION: Do a site backup prior to performing this function.

Dreamweaver/UltraDev 4 Template Recovery

As we said earlier, it is really easy to recover your template that was created with either of these applications.  If you are attempting recovery of a Dreamweaver MX template, then please see this tutorial (Coming soon!).

The recovery process...

  1. Start Dreamweaver.
  2. Open the desired site that has the lost template.
  3. Check if there is a folder named Templates off the site root. If there is not a Templates folder, then please create one at the site root. (Case is important!)
    Create Template folder:
    A. Right click on the site root (Site - blahblah)
    B. Select New Folder from the contextual menu
    C. Type Templates and press the Enter key
  4. Open a child page that is based on the lost template
  5. Select Code View and look for the line that looks like this:
       <!-- #BeginTemplate "/Templates/DW4Base.dwt" -->
    This tells you the path to the template and the template name.
  6. Save it in the Templates folder using File > Save as..., being sure to rename the file to the filename that you see from the previous step. This includes the extension of the file, from.htm to .dwt.
  7. Remove the line from the template stated in step 5.
  8. Just above the closing html tag </html> there should also be a line that reads:
    <!-- #EndTemplate -->
  9. Remove the line from the template stated in step 8.
  10. Change the contents of the editable regions so that they aren't so content heavy if you like.
  11. Save the Template.
  12. Update the associated pages (There should be no requirement to update).
  13. Verify that the pages are in fact correct.
  14. Upload the changed files to the server.

NOTE: If you have made any changes to the child page in Dreamweaver MX, such as adding an editable region, you may see the line below instead of that stated in step 5 above:
   <!-- #BeginTemplate "/Templates/DW4Base.dwt" --><!-- DW6 -->

Use this entire line for the above exercise if that is the case.

That's all there is to it for Template recovery using Dreamweaver or UltraDev 4.