Dreamweaver CS 5.5 Template not updating child pages
Hi,
I'm trying to help a customer with a template she's been working on. She uploaded the changes she made to the template, but the template will not update the child pages. I have tried to open and update the template, but when I save it, it doesn't ask if I want to update the child pages. So, I went to one of the child pages and went to Modify > Templates > Update current page. Then it gives me an error message that says, "Error accessing file "Y:\Templates\ENRMD.dwt": file not found (error code 2).
I had the girl who works with the site open the template on her local copy and go to Modify > Update Pages > Files That Use, it's empty. No templates show up.
I have no idea what's going on because the file is there. You can see it in dreamweaver, in the Templates folder. Any ideas???
Adobe DreamweaverHTML
Last Comment
savache27
8/22/2022 - Mon
rbudj
First make sure that the changes within the template are actually being made OUTSIDE of an editable region. This is one common mistake.
Next, try opening the template, File > Save as a Template, and save it with a different name. Duplicate the current template for safety and then rename it to ENRMD_old.dwt and choose not to update the child pages with the name change. Now rename the template you just saved as ENRMD.dwt.
Jason C. Levine
"Error accessing file "Y:\Templates\ENRMD.dwt": file not found (error code 2).
Also check the child pages to make sure the path to the template is not actually Y:\Templates\ENRMD.dwt but rather a relative path.
savache27
ASKER
Hi,
The changes I'm trying to make just to get it to update are being made outside of an editable region.
When I opened it and chose Save as Template, a dialog box came up. It has the following:
Site:
Existing templates:
Description:
Save as:
In the Site drop down, the only available options are "web draft and root", and "wwwroot". And these existing templates are for our main site. This site I'm working with is actually a sub site. It has it's own folder, called EC, in our web draft and production folders. And in the EC folder there is a Templates folder specifically for their site. I don't want to save it in our web draft or root Templates folder.
I tried doing the rename with the Save As option instead of Save as Template, and that didn't work. When I make changes it still just saves without asking to update child pages. I hope what I'm saying makes sense. I'm probably not explaining it well at all.
If I create a new page and save it in the EC folder, and then go try to apply the template, the only option I get in the dialog box under Site is my "web draft and root" folder for the main site.
savache27
ASKER
Same thing if I go to Page from Template. Well, actually I get both "web draft and root" and "wwwroot".
savache27
ASKER
jason1178, I'm sorry, I'm not entirely sure. I haven't been doing this very long. We basically have a web draft server. I take care of the main site. Each unit has their own site that lies on the web draft server. They make changes to their site, and then I upload them to our production server. There are times when I will have to go into one of their sites and make a change for them. Should I try to get her to create a new page based on the template and see what response she gets?
The reason I ask about nesting Site Definitions in Dreamweaver is that it will screw up anything that relies on the DW cache. Each site has to be in a separate folder and the folders cannot be nested.
root
site 1
site 2
is okay.
root
site 1
site 2
is not.
savache27
ASKER
Well, it's like this:
Root
Site 1
Site 2
Site 3
etc
Templates
index.html
geninfo.html
That's just an example. But what I'm saying is...we have an index and other pages, as well as a Templates and Images folder directly under the Root, which is our main site. All other sites would just be like you said...in their own folder...Site1, Site2, etc.
I haven't gotten any warning beyond trying to deal with this template issue. I can make changes on without any problem. I can make changes to that particular template, it just won't update the child pages. But it won't do it from her local copy either. I'm going to follow your suggestion and see if she can create a new page based on the template from her local as well as the web draft server.
Turns out that she couldn't update the child pages because she did not have the site mapped in Dreamweaver. Once I had her do that and make a change to the template they all updated. Apparently she was just opening the pages in DW and editing them.
I'm curious if anyone knows if I would need to map the site separately from the root in order to work with the template. I can edit templates as long as they are in the main Templates folder...like the one we use for our main index.html in the root. But if it's say...Site1, Site2, etc...then I cannot update child pages by editing the template. Same goes with trying to create a new template in one of the Site template folders. I don't have the option to apply it to the pages within the Site folder, or anywhere else actually.
Jason C. Levine
See my answers above. Nesting site definitions is a Bad Idea.
savache27
ASKER
Okay, I guess I'm confused because you said that this is what DW expects to see:
Root
Site 1
Templates
Site 2
Templates
Which is what we have, but also within the root is an index.html as well as some other pages that belong to the root...along with a Templates folder in the root. I can't really make changes to how this is stored. I didn't set it up. So if that is what is keeping me from say...working on Site1 and using the Site1 template on the pages within the Site1 folder could I just map Site1 separately and then upload it to the root? Do you think that would work. I apologize for asking what I'm sure is a stupid question. I'm just clearly not knowledgeable about it.
But do you see that I have no site defined in the root? Otherwise, the tree looks like this:
Root
Site 1
Templates
Site 2
Templates
Site 3
Templates
and that will generate the errors. My initial example has Site 1 and Site 2 standing at an equal directory level but there are no site definitions above them.
The takeaway is you should NOT define a second site within the directory structure of an existing site. Instead, that is all one Site for DW purposes. You can have as many templates as you wish but don't nest the sites.
savache27
ASKER
Okay, but why then, when I'm working in say Site1 folder, and make an update to the Site1 template will it not give me an option to update the child pages? And as I said before, if I try to apply it to a new page within that folder it only gives me the option of using the main Templates folder from the root. And the only template I have saved there is our main template. That's why I was asking if I needed to just map Site1 as a separate site and make the changes, and then upload those changes to the root. I apologize if you've already answered this and I'm just not understanding it.
savache27
ASKER
Thanks for all your help. I mapped it separately and it works now.
Next, try opening the template, File > Save as a Template, and save it with a different name. Duplicate the current template for safety and then rename it to ENRMD_old.dwt and choose not to update the child pages with the name change. Now rename the template you just saved as ENRMD.dwt.