Tips for Success
by Shirley E. Kaiser, M.A.
Copyright © 2001-2016, Shirley E. Kaiser, M.A., SKDesigns. All rights reserved. Published at websitetips.com with permission.
“Oh, no! I didn't want that to happen!” Sound familiar? Most often when I'm training people, I find that if they're reluctant to dig in and use the Replace and Extended Replace tools with gusto it's because they're afraid of wreaking havoc in their documents. How can you more accurately find and replace text or other content? Learning how to use these powerful tools effectively greatly reduces and can even eliminate deleting or replacing what you didn't intend, especially if you always make backups first.
|Find||Ctrl + F|
|Replace||Ctrl + R|
|Shift + Ctrl + F|
|Shift + Ctrl + R|
How do you do a global replacement of the navigation to an entire Web site with the click of a button? It really is possible using HomeSite's Extended Replacement tool with a little planning.
Learning how to use this powerful tool confidently and effectively is really the key to saving the hundreds of hours that's truly possible mentioned in the Introduction. This section will address questions like this and tips I've found to help making the Find and Replace tools some of the most valuable tools for building and maintaining Web sites.
All it takes is a little careful thought and planning before you click the Replace button.
Note that even though this tutorial was written with HomeSite 4.5.2 in mind that it also applies to HomeSite 5.x versions and to earlier versions.
On this page:
My strongest recommendations are to:
- Make backups of your documents before you begin working with these tools.
- Practice and experiment with these tools.
Backing up your documents will reduce the fear of irretrievably ruining your work and it will also eliminate a lot of time in reconstructing documents if the replacing doesn't go as you'd hoped.
Practicing and experimenting with these tools will help you learn how to use these tools more effectively. How do you practice and experiment? Take any of your HTML documents and open them in HomeSite, making backup copies first. Pick a word or phrase and try replacing it with something else. Try a variety of terms and phrases and see what happens to a single page and to documents in a folder or HomeSite project.
Removing Unnecessary Spaces
You can remove unnecessary spaces in your document in a couple of ways:
- Use the built-in tool for eliminating double-spacing,
- Use the Extended Replace tool.
These are described below.
The Remove Double-spacing Tool
- In the drop-down menu, click on Search->Replace Double Spacing with Single Spacing (at the bottom of the drop-down menu list).
- A Confirm dialog box will appear with the question,
"This will replace all double-spaced lines with single spaces. Continue?"
If you'd like to continue, click Yes.This action will eliminate all the double spaces in your document.
Extended Replace Tool
- Highlight the extra space in your document and click on Search->Extended Replace.
- In the Replace with box, leave it blank.
- Click on Replace.
- The Extended Replace tool will then remove all the extra space identical to the space you highlighted.
Tutorials in this series on the Replace and Extended Replace tools:
Editor note March 2006: This reference was during 2000 when I wrote this tutorial. At this point I use CSS for rollover effects, and I also use server-side scripting and “include” files for common elements like navigation, headers, footers, etc. This way I have one file for each content element that repeats throughout the site - quite efficient and easy to manage. If you're interested in any of these possibilities, see the following sections here:
In order to accomplish this, when I initially designed the Web site, I created a template to use for each page to maintain consistency throughout the site and to also allow for large blocks for global changes if needed. If the content is identical, it's just a matter of clicking the Replace button to change it throughout as many pages as you wish.
Common areas of a Web page design for global replacements
With a professional design, there are usually various parts of a Web page that are consistently designed throughout a Web site. These areas accommodate global changes especially well, such as:
- Navigation (graphics or text).
- top of page layout, such as headings, navigation, links.
- bottom of page layout, bottom of page information, such as copyright info, contact info, credits, references.
If you use the pages of this tutorial as an example, you'll see that there are several elements that are identical throughout the site. This is important for consistency for visitors, information design, and other factors. Additionally, it makes global changes possible. Some of the identical elements for this tutorial's pages are the left side section navigation, the global navigation at the top of the page, including the logo, and the bottom of the page footer area.
What do you do if you don't currently have a design to accommodate global replacements?
Well, unfortunately you may not be able to do a global replacement this time for design elements that change. But, if you now copy/paste the new navigation (and other identical content) into the pages so they're identical from now on, you'll be set to do global changes for the next time you need to make any changes. You never know when you or your client may want to add a new category to the navigation, remove a category, change a title, or make other changes to the site.
What about global changes for phrases, words, or characters?
As long as the words and spacing are the same, the global changes will work. You can also narrow the focus to match whole words, the letter case, or from a specific point above or below the cursor. Also, of course, you can narrow your search to just one page, one directory, or to the pages currently open. If you're familiar with expressions, you can also utilize these to focus your search.
By planning ahead and considering potential future changes, you can utilize the Extended Replace tool to literally save hundreds of hours in otherwise tedious, time-consuming work. You'll use your time far more efficiently, and your client will also be very pleased at your ability to make changes quickly and with reduced cost.
If your Web pages aren't set up to do this now, all is not lost. You can still set them up to utilize this incredibly time-saving tool.
Tutorials in this series on the Replace and Extended Replace tools:
Find and Extended Find Tools
Question: What if HomeSite doesn't find what you're looking for?
Answer: Here are a few common causes:
- spelling inconsistencies or typos,
- syntax differences,
- you've added an extra space in the Find text box,
- what you're looking for isn't actually on the currently active, open page, and perhaps an Extended Find would be more appropriate,
- low computer resources. See explanation below.
October 2000: After you've been using HomeSite for awhile, it may start popping up messages that you're low on resources or other similar messages. There's a memory leak problem with HomeSite 4 versions that's being resolved in a beta testing right now (whew!). For now, restarting the computer typically resolves the problem. The good news is that the beta testing will be completed within a few weeks and a patch will be available. I'll post a notice about that when it's available.
The Replace and Extended Replace Tools
Question: What do you do if there are other uses of the 'imagination' term that you want to remain while replacing a few instances of the 'imagination' term?
Answer: Here are a couple of possibilities:
- One approach is to use the basic Replace Tool as shown in Part 2. This approach allows you to check each occurrence before it's replaced.
- Another approach is to consider what is unique to the term or other content you wish to replace. For example, it may always be followed by a period, a space, or is used in conjunction with another term. If there's something unique about it, then you can use the Replace All tool to quickly replace only the desired content on a page.
Of course, you need to be careful about making multiple replacements to ensure that you only replace what you really want to replace. Using the Find or Extended Find tools can help you locate all instances first and thus evaluate what might be replaced and to check for unique qualities to see if a global replacement can work.
You can also choose to change only the pages that are open or in a specific folder. That can be a very fast and effective way of changing certain pages but not others.
I've found that sometimes I can do a couple of global replacements using certain unique qualities to accomplish the changes, rather than using the individual Replace tool. So there's not always a black-and-white, all or nothing solution.As you're learning to use these tools, I'd suggest making backup copies of your documents first. It's far easier to later delete an extra backup copy than to have to re-do a document.
You can download a fully functional trial version of HomeSite through Macromedia's Web site.
Disclaimer: WebsiteTips.com and owner/editor Shirley Kaiser have no monetary affiliation with Macromedia or HomeSite.