homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
Forum Library, Charter, Moderator: open

WYSIWYG and Text Code Editors Forum

Calling all Dreamweaver experts
Please make my life easier.

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

I am trying with all my might to find out a way to 'strip content' en masse from templates.

I did a tables based layout with VERY bloated code that I have since shrunk down quite a bit. Unfortunately I cannot find a good way to automate the process as much as possible to transer the new template code to the old bloated site. Dreamweaver adds to code 'en masse' very well.....but when it comes to subtracting code it seems to falter a bit.

Does anyone know of a good way I can strip the 'content' of my site, and use it with my new template besides opening every single page and copy and pasting?

Please help me! If you think you can be of help, let me know and I will sticky you the url for your thoughts.


brotherhood of LAN

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

This might be different for different versions of DW, but the option at EDIT > FIND REPLACE on the site map is ideal for adding/replacing masses of code.

If you ain't used it before, I recommend making a backup copy of your site first :)

strip the 'content' of my site

So you don't want to strip code bloat out a template, but more like strip the content from the bloat?

The regular expressions option in the search replace should enable you the chance to edit any sequence of code.

Put the options to search for source code and do this for the entire local site, and it will make the changes sitewide.

If you wanted to delete everything before a particular tag for example....


Using that sitewide would delete everything in the source code sitewide before the <body> section.

The key is to make sure youre deleting only what you want deleted and nothing more or less!


 11:05 pm on Nov 25, 2002 (gmt 0)

You can also Find and Replace plain old text, as opposed to source code.

Using the Advanced option, you can replace text found between the <P> or <body>, or whatever makes most sense to you.

Definitely back your stuff up before attempting.

And remember, you can always choose to do it on one document, or one folder, as opposed to sitewide.

This way, it only takes you 30 seconds to make a horrible mistake, as opposed to 15 minutes of unrelieved agony. ;)


 9:09 am on Nov 26, 2002 (gmt 0)

you can search and replace by text, source code or (my favourite)by tag.

so i can go through the whole site for instance and find every instance of say <td height="200">

and just remove the height = 200 bit or strip the tag complety. You can even save Search and Replaces as a command with a little bit of knowledge.


 8:17 pm on Nov 26, 2002 (gmt 0)

Many good suggestions....thank you all.

I have devised a way to do it.

If you would like to see the final result it came out pretty nice as well (IMHO)

It's a frames-esque fluid style sheet layout (utilizing 'overflow:auto')

It's a good chunk of code if you're looking for good new (and search engine friendly) design.

Feel free to swipe some of it;)


 7:33 am on Nov 30, 2002 (gmt 0)

I am on the same boat. I am in the process of cutting my page sizes as much as possible, but I don't want to compromise the content.

I decided to do it the hard way: one page at a time.

I designed four different templates to accommodate my site content, and then I made myself an external style sheet.
Now I am in the process of eliminating all the code that can be replaced by the external css. I am also cutting down on the graphics each page can contain.

I figured that it will take me a while, but I am going to replace a couple of pages every day until I am finished with the task.

Is it worth it? Let me just say that I trimmed my home page to half the K it sported before, without compromising content.


 10:24 am on Nov 30, 2002 (gmt 0)

There is an easier way.

When you make your new template with the streamlined code, just make sure you name your editable regions the same.

Once you've done that, open up a page that used the original template and copy the comment at the top of the page that says what template has been used for the page.

<!-- #BeginTemplate "/Templates/originaltemplate.dwt" -->

Then go into the Find and replace function and do a site wide html code replacement.

find: originaltemplate.dwt
replace: newtemplate.dwt

Once you have changed the comment tag on all your pages to reflect the new template, opent the new template, make and edit and resave it. Doing that will apply the new template to rvery page in the site.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved