Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: open
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.
joined:Jan 30, 2002
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!
joined:Apr 13, 2002
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. ;)
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.
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;)
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.
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.
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.