"all template code is removed." does not work in CS3 Dreamweaver
What is the question? I am assuming that you did not remove the template on purpose.
Please give us details of the events that led to the template to disappear.
I did not say the template disappeared.
I detached the template and the help file says when this is done the code is removed, but I find that it is not removed and am wondering if there is a good way to remove the code after detaching.
here is the help file
- Open the template-based document you want to detach.
- Select Modify > Templates > Detach from Template. The document is detached from the template and all template code is removed.
I would like to know how to determine which document are using which templates and do a mass change so that I know for sure which template is being used.
I have not figured out how to do this.
Open any child page in Design View. In the upper right corner you'll see the Template: filename that drives that page. It is highlighted with a yellow background.
In addition, you can inspect the source code near the top of your pages for the source Template.
<!--InstanceBegin template="/Templates/filename.dwt" codeOutsideHTMLIsLocked="false" -->
Another method: Open your template.dwt file. Make a minor change to it and Save. DW will show you a list of child pages that use that Template and ask if you want to update them.
But Nancy, that was not what I was asking. ... I know how to do it file by file. What I was hoping to do was to search site-wide showing every file tied to a specifice template and perhaps be able to change the template to which those files were tied to another template.
Let me give you some background here. I have just spent the better part of a day editing a site because files were tied to multiple templates that had gotten out of synch, so the site was inconsistent. This site gets updated for election campaigns and some of the pages were linking to campaign material from 2011 and some were linking to material for 2013 and some were linking to 2013. We don't dispose of the old stuff because candidate may run again and so we keep what was said and any images from past campaigns.
Part of the problem was that campaign specific data was all over the place, so part of my time was spent moving campaign specific web pages to campaign specific folders, but the templates run a menu system and that was also causing problems. Yet another thing that was causing issues is that this site was set up to use Adobe's check out / check in control. and one of my templates was not properly being checked in nor were any of the changes I was making. Why this happened, I don't know, but I still want to be able to get a report, site-wide of what web pages are using what templates and I want to be able to change selected groups of webpages to a specific template enmasse without haveing to open every darn file and point it to my template.
That is what I want to do. Is this possible?
Use the Find feature (Ctrl+F) to search code in your entire local site for
Template/filename.dwt. Hit Find All. You should see a list of all child pages in the Results panel.
To do a global replacement, open Template/filename.dwt and SaveAs filename-old.dwt.
Then create a new template and SaveAs filename.dwt.
Let's say I already have two existing templates template1.dwt and template2.dwt. Template1.dwt updates 20 files, but is out of date. Template2.dwt is up to date and update 30 separate files, but never was linked to the 20 files updated by Template1.dwt.
What you are suggesting would update the 20 files connected to Template1.dwt, but would leave the 30 files still connected to Template2.dwt.
I don't care what I name it, but I want all files linked to one Template.dwt file.
Use Find & Replace, source code.
Does this help?
On my website you can download a free extension that will report, sitewide, wich file is associated with a template:
Please note this is 8 years old. I haven't checked it in recent versions of DW, but I expect it to work just fine.
Of course detaching/attaching a template can't be performed sitewide, but this tool at least should give you a better idea of your current codebase.
Hope it may help
How can I link a CSS file to multiple html pages that have not ever had a CSS linked? Do I need to open each page first or can I do a link with one step to all of the html pages?
If you have used the DWT system, merely attach the CSS to the template.
If not, then you will have to open each file. You could try 'Find and Replace' to help you.