Welcome to WebmasterWorld Guest from 54.167.85.221

Forum Moderators: open

Message Too Old, No Replies

Dreamweaver Template Application

Is there a way to apply to multiple pages "en masse"

     

Jas0n

6:42 pm on Aug 7, 2002 (gmt 0)

10+ Year Member



I have a Dreamweaver MX template that I want to apply to hundreds of pages. So far I've only been able to do it page by page.

Is there a way to apply a DW template to a group of pages all at once (for instance all pages in a directory, or all selected pages, etc..).

Thx.

Jas0n

gypsychild

9:30 pm on Aug 8, 2002 (gmt 0)

10+ Year Member



JasOn, although I have a different version of Dreamweaver, I think what you are suggesting could be possible, depending on the complexity of both the pages you are applying the template to and the template itself. From what you say, it sounds as though the application of the template works fine when you do it page by page. If this is the case, then you may be able to apply the template by selecting the files or folders you want to apply the template to and then using the find and replace function. You would need to find the common elements within the source file, ie,

<html>

and replace this with

<html>
<!-- #BeginTemplate "/Templates/YOURTEMPLATE.dwt" -->

and so on, for all the template commands. I would suggest you look at the source code on a template applied page and see where Dreamweaver inserts the code and look for common ground as in the above example.

This does work on simple page structures, but there may not be enough similarities on more complicated pages, in which case, you may have to do several different sets of find and replace or in fact, there may be too many to even make it worth the while.

You must try it on one or two test pages first and of course, make a complete backup before you start, as it could be quite a risky operation.

There may of course be better solutions and I have assumed the pages you want to add the template to do not already have a Dreamweaver template attached, but if they do, then there may be other ways to do this.

martinibuster

9:37 pm on Aug 8, 2002 (gmt 0)

WebmasterWorld Administrator martinibuster is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



And don't forget to backup your files before you try this at home.
:)

Jas0n

1:02 pm on Aug 9, 2002 (gmt 0)

10+ Year Member



I'll look and see if the template looks to complex to do the "find and replace" option.

I tried all the obvious options where I selected and/or opened multiple pages and tried to apply the template to them all at once but the drop down menu option only applies it to one page at a time.

Even shortcut keys might make it a little less ardous.

Thanks,

Jas0n

erikv

3:27 pm on Aug 10, 2002 (gmt 0)

10+ Year Member



...and make sure you replace or generate the right template regions in the text. Because if you don't and later on you load the pages into Dreamweaver MX, you're bound to run into trouble.

My own experience with the MX version is that it's a lot pickier when it comes to changing code outside its environment and then later expect it to work inside the app.

crash

7:33 pm on Aug 10, 2002 (gmt 0)

10+ Year Member



<html>

and replace this with

<html>
<!-- #BeginTemplate "/Templates/YOURTEMPLATE.dwt" -->

All that does is apply the template link that DW will recognize, but it doesn't include the actual template. You would still need to edit the rest of the source to mark the editable and non-editable regions with the proper tags for any changes to occur.

stuntdubl

7:44 pm on Oct 31, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I agree with erikv....
Dreamweaver MX is pickier when it comes to changing template code.

I have been having this problem recently,
with loads of bad code that I wrote earlier haunting me now.

If you are trying to change an existing template, you can just save it as the same name as what your old template was.

I think that you are trying to apply it to pages that DON'T yet have any template though, and I did that recently myself for about 200+ pages. I would like to know if there is a shortcut for future projects, as it would have saved quite a bit of time.

Jas0n

4:06 am on Nov 1, 2002 (gmt 0)

10+ Year Member



<snip>
I think that you are trying to apply it to pages that DON'T yet have any template though, and I did that recently myself for about 200+ pages. I would like to know if there is a shortcut for future projects, as it would have saved quite a bit of time.
</snip>

Yes, this is what I was looking for. But that's over and done with now. We did it the tedious way of applying the template to each and every page one by one by one by...

It's really stupid they don't have an easier way to apply the templates "en masse"

While I'm on my soapbox, their "remove template" feature leaves a little bit to be desired as well because it leaves all the template code on the page--- it just removes its "active connection" to the source template and lets you then edit what were formerly template regions. I would prefer to have it remove all traces of the template so the page was in its "pre-template" condition.

stepping down now...

Jas0n

stuntdubl

10:02 pm on Nov 25, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Dreamweaver is great about saving us work as webmasters....(one of the reasons I decided to go back to doing webdesign), but this seems silly that they don't have a way to do this.

Will some of the experts please dig a little with me to confirm whether or not this is or is not possible?

If it is not possible, what are the best work-arounds that you can come up with?

 

Featured Threads

Hot Threads This Week

Hot Threads This Month