Flylib.com

Books Software

 
 
 

TIP 203: Changing References Across a Site


TIP 203: Changing References Across a Site

Sometimes you need to change references throughout a site from one file to a different file. You can try to make these changes with complicated Find and Replace sequences, but Change References makes it easy with just a few clicks.

Warning About Image Sizes

If you change references for an image, you should try to make sure the two images have the same pixel dimensions. The Change References command only updates the image reference, not the image dimensions. If the two images are different sizes, you should perform a quick site-wide Find and Replace (see Tip 205) to update the image dimensions.


Select a file in the Files tab of the Site window that needs to be redirected and select Site > Change Links. The selected file is automatically added to the top field, so now all you have to do is tell GoLive what file you want to replace the links with. Use the Point and Shoot tool to locate the new file in the Site window and click OK when you're ready ( Figure 203a ).

Figure 203a. Assign the new and old references and click OK.


Confirm the changes in the Change Links dialog ( Figure 203b ) and click OK. Kick back and watch as GoLive does all the heavy lifting and updates all the necessary pages.

Figure 203b. Confirm the site-wide link changes.



TIP 204: Using Find and Replace in a Document

Situation : You've landed a job renovating the neglected Web site of a medium- sized business. None of the pages is currently based on a template, nor is data stored in a database. You have every intention of implementing both of those features in the future, but the task at hand is to immediately correct and update the information on the static pages.

Save yourself a lot of time by using Find and Replace to quickly handle these kinds of edits. The Find commands are found in the Edit menu. A number of sub-menu items are nested under Find: Find Text, Find Next, Find Previous, Find Selection, Enter Find String, Replace, Replace & Find Next ; some of these options will be grayed out until you've performed at least one find operation. Knowing when and how to use these commands is the key to successfully performing edits with ease.

Open the page where you want to perform a Find operation, choose Edit > Find > Find Text, and choose Top Document from the pulldown menu at the bottom. You can type, paste, or drag text or syntax into the input box at the top ( Figure 204 ).

Figure 204. To run a Find operation on the active page, choose Top Document from the menu at the bottom of the Find Text window.


Toggle open the Options section to select options for your search:

  • Match Case : Enable Match Case if you want the case of letters to be consideredfor example, you want to find web but not Web .

  • Entire Word : Select Entire Word if you want a word to be found only if it exists on its ownfor example, to find hand but not handsome.

  • Regular Expression : Enable Regular Expression if you want to use wildcards in your search operation, but be careful! If you don't know what you're doing, you could wreak havoc on your pages.

  • From Top : If you click From Top, the search will start at the top of the page. Otherwise it will begin at the location of the cursor.

  • Wrap Around : Wrap around will perform the search from the cursor to the end of the page and then go to the top and end up back at the cursor position again.

  • In Selection : To run the find operation on the current selection only, enable In Selection.

Look What I Found!

GoLive has a clever feature that enables you to run additional searches without reopening or bringing the Find Text window back into focus. If you've previously run a search, you'll notice that additional Find commands such as Find Next become available in the Find submenu. Simply by using the associated keyboard shortcuts, you can run find operations on your page without even using the Find Text window!


Note

To search for text, run the Find operation in the Layout, Source, or Outline Editor; to search for syntax, use the Source or Outline Editor.


To replace the found text with different text, type the replacement into the Replace input box. With your options selected and replacement in place, you're ready to run the search. To begin, click the Find button. If a match is found, it will be highlighted on the page. Click Find Next to move on to the next instance or click Replace to replace the found item with what you have in the Replace input box. Click Replace & Find to both replace the found item and move on to the next instance. If you want to replace all found instances, click Replace All.