Skip to main content
Participant
March 27, 2023
Question

Template ; I sometimes want to override editable region...

  • March 27, 2023
  • 4 replies
  • 549 views

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?

    This topic has been closed for replies.

    4 replies

    Participant
    March 30, 2023

    Thank you both.

    Nancy OShea
    Community Expert
    Community Expert
    March 27, 2023

    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.

     

    Nancy O'Shea— Product User & Community Expert
    BenPleysier
    Community Expert
    Community Expert
    March 27, 2023

    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?

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Nancy OShea
    Community Expert
    Community Expert
    March 28, 2023
    quote

    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.

     

     

     

    Nancy O'Shea— Product User & Community Expert
    Nancy OShea
    Community Expert
    Community Expert
    March 27, 2023

    You would need to make changes to the original template and save as Template2.dwt.

     

    Nancy O'Shea— Product User & Community Expert
    BenPleysier
    Community Expert
    Community Expert
    March 27, 2023

    Normally when you save the template, Dreamweaver prompts you to update pages based on the template.

     

    See this for more.

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!