Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Dreamweaver (all versions)
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old May 5th, 2004, 04:42 PM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your response.

But if I save my template as an .asp page, then:

1. Will it be a .dwt file? Do I have to make it all from scratch? Edit regions etc? Then save it as dwt? Or I did not understand well?

2. Most important: what about all my files that now are attached to this non-asp template? Will be forever attached to this template?

Thanks in advance

Reply With Quote
  #12 (permalink)  
Old May 5th, 2004, 04:46 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I think what karib is referring to is that he (she??) wants to add server side stuff to the template, not to pages based on that template.

If you want to create an ASP template, follow these steps:

1. Choose File | New... and then choose Dynamic | ASP VB Script
2. Do whatever you want with this page; add behaviors, includes, etc (after all, this is just a regular ASP page at this point)
3. When you're done, choose File | Save as Template...
4. Name the template with any name.

Dreamweaver will now save the page with a double extension, e.g. Maintemplate.dwt.asp

Other pages based on this template will now also behave as an ASP page, although it's important that *you* save them with an ASP extension.

Does this help?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: In My Heart by Moby (Track 3 from the album: 18) What's This?
Reply With Quote
  #13 (permalink)  
Old May 5th, 2004, 05:03 PM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your efforts to help me.

So, all I want to do is to add a server side include.
This should be added to every page.
So, I want to do this to my template page and of course then it will be instantly available to every page.

But, when I constructed the template page (and all other files that are instances of template) I did it with File-new-basic-html page.

Problems:
1. I tried the steps Imar said, but it saved it as .dwt file, not dwt.asp file.

2. Even if this works after the things you will tell me, do I lose my old template? Is there any solution to work with this file because I have made lot of work with this template and it is not easy to construct all over from the start.

3. Do not forget the existing pages that are attached to the existing template.

Thanks in advance

Reply With Quote
  #14 (permalink)  
Old May 5th, 2004, 05:12 PM
Authorized User
 
Join Date: Jul 2003
Location: New Milford, NJ, USA.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to chabrown Send a message via MSN to chabrown
Default

I think you are misunderstanding the use of templates. The template file, and the asp file are two completely different files.

There are several ways to attach a template to a page. The way I like to do it is to create the page and name it (with the asp file extension), open the assets panel, go to the template category, and drag the template onto the page.

Then you save the page.

If you give that a try, you will see what we are saying. Hope this helps.

Charles E. Brown
Author - Beginning Dreamweaver MX, Fireworks MX - Zero to Hero
Contributor - Macromedia Studio MX Bible
Reply With Quote
  #15 (permalink)  
Old May 6th, 2004, 02:38 AM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your response.

I have gone to windows explorer and renamed manually the original template from .dwt to .dwt.asp.
Then I edit it, it seems that Dreamweaver it handles this like the original .dwt files.
Then I made a new page from this template. I save it and it took automatically the .asp extension.

So, I think (please correct me if I am wrong) I gave just turned the template to an asp-based template. Now I go to Insert menu, and I can insert a server side include.

The bad part is that Dreamweaver does not make automatically change of the extensions of all the attached pages, so the only way I see is to manually create the again from the start, from this 'new' template. It will definetely be a lot of work for me.

What do you think about this?

Thanks in advance.

Reply With Quote
  #16 (permalink)  
Old May 6th, 2004, 02:56 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

What extension are you referring to? The extension of the real page, or the extension that is embedded in each page and is referring to the template the page is based on?

In the first scenario, use a command prompt to batch rename all the files to the new extension.

For the second scenario, you can use an external Search and Replace tool. Dreamweaver probably won't allow you to search and replace the embedded names of the template (as that would break the template code), so you'll need a third party tool to do the search and replace. One tool I can recommend is: http://www.funduc.com/search_replace.htm
Be sure to make loads of backups before you start replacing stuff.....

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: God's Cop by Happy Mondays (Track 2 from the album: Pills 'N' Thrills And Bellyaches) What's This?
Reply With Quote
  #17 (permalink)  
Old May 6th, 2004, 03:30 AM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thnaks for your response.

I mean the extension of the real file. The filename.

Anyway, I will not make any convertions by search and replace, because I am scared of mistakes.

I prefer the hard way, building them all from the start.
Copy every single page to a new instance of the 'new' template.
I think it is the safest way.

Reply With Quote
  #18 (permalink)  
Old May 6th, 2004, 03:52 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

If all you need to do is change the filename, open a command prompt, browse to your web site folder and type in:

rename *.htm *.asp

and hit enter.
This will rename all your .htm pages to .asp pages.

Personally, I wouldn't be afraid of using Search and Replace. It can be quite useful. Just make a copy of the entire web site in case anything goes wrong, and then use the tool I linked to. It's quite easy to use, rather powerful and offers its own backup procedures if you wish (although a copy of the entire site should be enough).

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Wasserturm by Einsturzende Neubauten (Track 13 from the album: Zeichnungen Des Patienten O.T.) What's This?
Reply With Quote
  #19 (permalink)  
Old May 6th, 2004, 03:30 PM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Finally I changed the .dwt file to .dwt.asp.
Then I applied this new template to every single .htm page and the save them as .asp.
Now everything is as I wanted.

Thanks for your support.

Reply With Quote
  #20 (permalink)  
Old July 30th, 2007, 03:19 PM
Registered User
 
Join Date: Jul 2007
Location: Savannah, GA, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

QUESTION PLEASE -- I have the opposite problem to the original poster in this forum. In Dreamweaver I created .asp templates and now I need to duplicate them and save as htm as the server to which I need to upload doesn't handle .asp. I have renamed all the pages .htm and that is fine on the server, but I cannot seem to find a way to duplicate the template and save as htm. Perhaps I just need to delete that line at the top of the code and then save as htm. Have tried simply renaming to htm but it doesn't work.
Can Anyone help?

Tom Jones
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying Template-based pages ychange Dreamweaver (all versions) 1 March 22nd, 2007 01:55 AM
Convert a batch file to run in VBscript - WSH issu malcomm VBScript 0 October 25th, 2006 12:35 AM
convert asp pages to xhtml BrendonMelville HTML Code Clinic 1 March 14th, 2006 01:52 PM
convert asp pages to xhtml BrendonMelville XML 1 March 14th, 2006 11:34 AM
HTM pages with dynamic content madhukp Classic ASP Basics 3 June 10th, 2004 03:57 AM



All times are GMT -4. The time now is 08:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.