Skip navigation
Currently Being Moderated

Applying or removing a template from an existing document

Jan 24, 2013 12:37 PM

 
Replies
  • Currently Being Moderated
    Jan 24, 2013 12:37 PM   in reply to Community Help

    "all template code is removed." does not work in CS3 Dreamweaver

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 25, 2013 5:46 AM   in reply to thePair

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 25, 2013 11:15 AM   in reply to Ben Pleysier

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 25, 2013 11:19 AM   in reply to thePair

    here is the help file

     

    1. Open the template-based document you want to detach.
    2. Select Modify > Templates > Detach from Template.  The document is detached from the template and all template code is removed.

     


     
    |
    Mark as:
  • Currently Being Moderated
    Apr 9, 2013 9:57 AM   in reply to Community Help

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 9, 2013 10:29 AM   in reply to HenryS30

    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.

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 9, 2013 11:04 PM   in reply to Nancy O.

    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?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 10, 2013 1:18 PM   in reply to HenryS30

    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

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 10, 2013 4:01 PM   in reply to Nancy O.

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 10, 2013 4:04 PM   in reply to HenryS30

    Use Find & Replace, source code.

     

    From:  Templates/template1.dwt

    To:  Templates/template2.dwt

     

    Replace All.

     

    Does this help?

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 10, 2013 11:48 PM   in reply to HenryS30

    On my website you can download a free extension that will report, sitewide, wich file is associated with a template:

    http://www.massimocorner.com/dreamweaver/utilities/template_report.mxp

     

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 18, 2013 5:36 PM   in reply to Community 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?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 18, 2013 6:18 PM   in reply to ParPar5

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 18, 2013 10:24 PM   in reply to ParPar5

    As Ben said, if you are using templates, go that route. If not, download this free extension:

    http://www.massimocorner.com/dreamweaver/utilities/sitewide_link_css.m xp

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points