Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing template associated with file

Status
Not open for further replies.

baybook

MIS
Sep 16, 2004
66
0
0
US
I have a series of files that are using template 1. Template 2 is now a subtemplate of 1

I want to change some of these files now to use template 2.

Is there a way to change this in dreamweaver?

Thanks!
 
Basically if you have a number of pages that are associated with say, template1, and you want to change template1 then this is easy, and you simply change the template and update the pages. If you want to change SOME of the pages to use template2, then you would have to detach the template from these pages, remove the markup you don't want, and attach the new template.
DW is pretty unforgiving with it's templates, so if you have the ability, I'd suggest using server side includes (SSI) instead.

----------------------------------------
Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
Ah, thinking outside of the box here.
IF template2 uses all the same editable regions as template1 (i.e if you have breadcrmbs on both, etc) then you could open the files outside of DW, change the name of the template associated with the page, save, and then reopen and update in DW.
ONLY do this if you have the ALL same editable regions on both, as it won't work if the editable regions are named differently, or some are omitted. (or if you want to go through and change each one by hand)
I would test this before putting it to work on all the pages, as it may have some unexpected hitches if the templates are significatly different.

----------------------------------------
Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
I must have missed the parameter in the file that says which template is associated with the file.

Can you tell me the name of the parameter?

Thanks
 
On each page associated with a template you will have something similar to this at the top of the page
Code:
<!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" -->

----------------------------------------
Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top