Copy link to clipboard
Copied
Hi.
I've been using DW Templates and it helps me a lot.
My quesion is, how to overwrite the "editable region" by the contents of "editable region" of the .dwt file.
For instance, look at the next code:
<!-- TemplateBeginEditable name="doctitle" -->
<title>ABC online store</title>
<!-- TemplateEndEditable -->
This is the editable region created at the beginning.
Then, I usually edit this title tag for each pages as below:
<!-- TemplateBeginEditable name="doctitle" -->
<title>contact page | ABC online store</title>
<!-- TemplateEndEditable -->
This is fine so far. But when you create next website based on this template-based website, you want to replace the brand name ABC with XYZ but it fails.
Just modifing the text ABC with XYZ in the dwt file and saving it end up with changing only the dwt file, not any other web pages baced on the template.
Any advice?
Copy link to clipboard
Copied
Normally when you save the template, Dreamweaver prompts you to update pages based on the template.
See this for more.
Copy link to clipboard
Copied
You would need to make changes to the original template and save as Template2.dwt.
Copy link to clipboard
Copied
To clarify terms:
Template.dwt is the main site file that contains all sitewide regions: header, navigation, footer, styles, scripts, etc.. that are common to all pages.
Child Pages are spawned from site Template.dwt files (File > New > Site Templates... Create). Child pages are named index, about, contact, services, etc...
Editable Regions are for unique content that changes from page to page. These regions can be edited from Child Pages spawned from that Template.
To change a sitewide element such as header, navigation or footer, open the main template.dwt file, edit as needed. Save & populate changes to all child pages.
The example you provided above, <title> is unique to each site page and should therefor be changed from each child page separately, not from the Template.
If you plan to maintain two Templates, one for Site ABC and another for Site XYZ, you can achieve your intended goal. First Save Template1.dwt as Template2.dwt. Edit <title> and save. Spawn new child pages (File > New > Site Templates > Template2.dwt > Create). Initially the new <title> will display until you change it on each child page.
I hope that makes sense.
Copy link to clipboard
Copied
What happens to the .dwt templates when Adobe decides to pull the plug? Would it be an idea to wean users away from using these templates?
Copy link to clipboard
Copied
What happens to the .dwt templates when Adobe decides to pull the plug?
By @BenPleysier
=============
I suppose we deal with that when the time comes. 😥
Depending on who you talk to, Dreamweaver is somewhere between assisted-living, palliative & hospice care. Discussion of advanced web technologies would just confuse the situation.
Copy link to clipboard
Copied
Thank you both.