Skip to main content
Inspiring
February 22, 2021
Question

Linking pages to a template

  • February 22, 2021
  • 4 replies
  • 2017 views

Hi everyone,

 

I am building a site using a template, but for some reason a large number of the pages are not linked, even though I used the same template to create all the pages. I built each and every page the same way. Often, when updating template pages, Dreamweaver stalls—it does nothing. After repeated attempts, I have to restart the computer. Otherwise, I can't update the pages.

 

The pages are all built off the same template. Is there a way I can link these pages to it, so that I don't have to create them all over again? 

 

Thanks for any help you can provide.

 

Mark

This topic has been closed for replies.

4 replies

B i r n o u
Legend
February 24, 2021

I work very often with templates and the behavior you encounter happens frequently. As OS says, it's a little dated mechanics, which receives a lot of contraindications over the years ...
anyway, I still use it... you don't change bad habits (joke)
so when the child pages do not update with the parent template update, it is important to explicitly make sure that all the internal links are restored, for this, two operations are necessary:
1 - open the Assets panel, and from the contextual menu at the top right, recreate the site list
2 - then open the various child pages, and always from the assets panel, drag and drop the ad hoc template on the page (over the display mode) in order to reactivate the application of the template. normaly a small asterisk should appear on the page tab beside the filename... proof that something was wrong

 

normally everything should be in order now...

BenPleysier
Community Expert
Community Expert
February 23, 2021

If you want a robust system that utilises Dreamweaver's template system, have a look at http://www.webassist.com/dreamweaver-extensions/framework-builder

 

Using this extension allows you to update the template independant of the child pages and vice versa. Used it a lot prior to changing from PHP to NodeJS

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
February 23, 2021

Assuming your main template.dwt file isn't corrupted, try Restore Preferences. This fixes most problems in DW.

https://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver.html

 

Nancy O'Shea— Product User & Community Expert
Inspiring
February 23, 2021

Thanks Nancy. I do think it needs to be done because it acts up regularly. 

 

Is there any way to determine the number of child pages there are for any given .dwt file? I don't see anything under the Site or Tools menus.

 

Thanks.

 

Mark

Nancy OShea
Community Expert
Community Expert
February 23, 2021

Is there any way to determine the number of child pages there are for any given .dwt file?

==========

Mark,

I don't know of any.   Each child page refers to it's own template, but templates don't keep track of child pages except internally.  For a lot of reasons, I don't use DW proprietary templates.  They rely entirely on DW to work and as such are prone to failures.  For what I do, server-side includes are much faster and more efficient than DW templates.

https://alt-web.blogspot.com/2015/07/server-side-includes-with-php.html

 

Nancy O'Shea— Product User & Community Expert
BenPleysier
Community Expert
Community Expert
February 22, 2021

Each of the child pages will have a link to the template. In Dreamweaver, the link is coloured green. Check each of these links to ensure they are correctly formatted. Also make sure that the editable regions are correct.

 

Having said that, Dreamweaver's templating system is very outdated. Most developers choose to use server side includes instead. There are other templating engines out there if you wnt to stick with templates. The most common is Smarty

 

As for me, I use Node/Express/EJS.

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

Hi Ben,

 

Thanks. It's the strangest thing. The files that will not update look exactly like those that do. I've done this before, so I know I did this correctly. The template only has one edible region, so I tried to link them to the template via Tools>Template>Link Page to Template. Oddly enough, some worked and some didn't. A few I had to try multiple times, and a few still didn't update. I'm going to trash the site and start again. 

 

Kind regards,

 

Mark

Inspiring
February 22, 2021

I just created a new template and it won't even update the first page I created. I have the "update pages when template changes" checkmarked. What is the proper way to update the pages? I normally select File>Save All, and then it asks if I want to update the template pages. Is there a better way? 

 

Thanks.

 

Mark