Searching for elements
Use the Code Elements feature to perform either simple search tasks involving elements or sophisticated operations that edit and manipulate elements or their plain- text contents.
To search for elements: - Choose Edit > Find.
- In the Find & Replace Content window, click the In Multiple Files tab.
- Choose Code Elements from the topmost pop-up menu in the Find section.
- In the Find section, specify Element options as follows:
- Choose Is or Matches from the Element menu.
- In the Element text box, either type the name of the element you're searching for or choose an element from the menu.
- For a Structured search, choose the attribute in the Attribute menu in the Find section, and choose an operator and attribute value in the menus that follow. To add another attribute to the search, click the Add button
, and then specify another attribute, operator, and attribute value. - For an Advanced search, click Advanced and do the following in the Find section:
- Type the attributes, operators, and attribute values you want to use as search criteria in the text box, or select attributes and operators from the Attribute and Operator menus.
- To search for elements by comparing attribute values, type two attributes and an operator. For example, to search for elements that have a width greater than the height, type the following:
height>width - To search for the plain text contents of an element, enter the keyword content, an equal sign operator, and the text contents in quotes. For example, to search for all occurrences of "June" (no style applied) in the element you specified, type the following:
content="June" After specifying the search criteria for plain text, you can specify the text you want to use as a replacement. For example, you can replace all occurrences of "June" in a specified element with "July." To replace the text contents of an element, use the Replace Content action. (See Editing elements in multiple files.)
- Define the scope of your search by doing one of the following:
- To select a site or a collection that is saved with a site, choose Sites and Collections from the Search In menu, and then select the site folders, files, or collections you want to search. (The site must be open for it to appear in the window.)
- To select individual files from a site, open the site window, drag or Shift-drag the files from the site window to the file list in the Find & Replace window.
- To browse and select individual files, choose Files from the Search In menu, and click Add Files. In the Add Files dialog box, locate and select the files you want (click Add All to select all files in a folder), and then click Done.
- To select an open page, drag the Show Page Properties icon
from the top right corner of the document window to the file list in the Find & Replace window. - To search within a previous result set (an open list of matches that resulted from a previous search), choose Result List from the Search In menu.
- Click Find All. GoLive displays the hits in the Result window.
To save result sets for use in another search: In the Result window, do one of the following: - To search for another element within the result set, click Use Result. You can remove files from the result set by selecting them and clicking Remove.
- To save the results as a collection in the currently open site, click Save Collection, type a name for the collection in the Create a New Collection dialog box, and then click OK (a site must be open for the Save Collection option to be available). Saved collections are displayed in the Collection tab of the Site window. For more information, see Using collections.
|