WebsiteTips.com - Web Design Tutorials, Tips, Top Resources

HomeSite's Find and Replace Tools, Part 5

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.

photo of frustrated person“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.

 HomeSite Keyboard Shortcuts
FindCtrl + F
ReplaceCtrl + R
Extended
Find
Shift + Ctrl + F
Extended
Replace
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.

Recommendations

My strongest recommendations are to:

  1. Make backups of your documents before you begin working with these tools.
  2. 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.

top‘On this page’ menu

Removing Unnecessary Spaces

You can remove unnecessary spaces in your document in a couple of ways:

These are described below.

The Remove Double-spacing Tool
  1. In the drop-down menu, click on Search->Replace Double Spacing with Single Spacing (at the bottom of the drop-down menu list).
  2. 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
  1. Highlight the extra space in your document and click on Search->Extended Replace.
  2. In the Replace with box, leave it blank.
  3. Click on Replace.
  4. 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:

top‘On this page’ menu

Global Replacements

One of the inevitable situations with building and maintaining a Web site is how to handle a major global change effectively and accurately. I've recently upgraded the navigation on my business Web site, SKDesigns, for example, from standard graphic links to graphics with JavaScript mouseovers. Since there were about 12 pages, I wanted to be able to do a global change to the Web site rather than manually typing or even doing a copy/paste to each page.

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:

Think ahead!

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:

  1. Navigation (graphics or text).
  2. top of page layout, such as headings, navigation, links.
  3. 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:

top‘On this page’ menu

Troubleshooting Tips

Find and Extended Find Tools

Question: What if HomeSite doesn't find what you're looking for?

Answer: Here are a few common causes:

  1. spelling inconsistencies or typos,
  2. syntax differences,
  3. you've added an extra space in the Find text box,
  4. what you're looking for isn't actually on the currently active, open page, and perhaps an Extended Find would be more appropriate,
  5. 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.

Tutorials:

top‘On this page’ menu

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:

  1. 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.
  2. 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.

Tutorials:

HomeSite icon 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.

top‘On this page’ menuNavigation belowSearch/Sidebar

Articles, Tutorials, Tips:

Most Popular Books

In association with  In Association with Amazon.com 

Our Other Sites

SKDesigns

Effective, accessible, standards-based Web site design since 1996

SKDesigns - skdesigns.com

Brainstorms & Raves

Weblog on Web design, CSS, standards, music, more. By Shirley Kaiser, SKDesigns.

Brainstorms & Raves


Within Articles, Tutorials, Tips:

Within Web Site Resources:
SkipShow or Hide Detailed Navigation