Using Adobe GoLive CS, Part 1 - Queries and Collections
(Page 14 of 14 )
Queries and collections, though two different features, are very powerful when used in combination. Use queries to define complex searches that you can run on a page, on a range of pages, on a site, or application-wide. You can even run queries on the results of other queries to get really granular. Queries differ from the normal Find dialog because via a query you can search on much more than text. For example, you can run a query to find a set of files that were modified on a certain day, or all pages that contain a table. The options for creating queries are vast, and you'll quickly see how useful they are for managing large sites.
Collections are any particular set of files that you define. For example, if you had a Web site with pages nested several directories down that often need updating, you could create a collection of those pages. Then, instead of having to navigate through multiple directories to reach those files, you'd simply double-click the name of the collection in the Collections tab and those pages would be listed at the top level.
The results of a query can be saved as a collection, and a query can be attached to a collection so that it can be updated as necessary.
Running Queries
To run a query, choose Edit, Run Query from the menu bar. Select a query from the list and click Start, or click the New Query button to create a new query. Select a query from the list and click Edit Query if you want to change a query that already exists. Give your query a description, and then choose an option from the Find What pop-up menu. After you've made your selection, you can add criteria by clicking the little circle with the right-facing arrow in it and choosing an And, Or, or Not item. An And item means that both the first and second criteria must be met, an Or item means that one or the other must be met, and a Not item means that the first item must be met while the second must not be met. You can continue to add criteria to your heart's content (see Figure 9.24).

Figure 9.24 Create very specific searches in the Queries dialog box.
Click the Test Query button to test the query. You can remove items from the results by selecting them and clicking the Remove button, save the results as a collection by clicking the Save Collection button, or click the Use Results button to run another query on the results of the first query (see Figure 9.25). If you think you'll reuse the query, you should save it.

Figure 9.25 By clicking Use Results to run additional queries on the results of the first query, you can get searches that are incredibly granular!
Creating Collections
To create a collection, click the Collections tab of the Site window, and then do one of the following:
Click the Site set of Objects in the Objects palette, and then drag and drop a Collections icon into the Collections tab.
Click the Site set of Objects in the Objects palette, and then double-click the Collections icon.
(Control-click) [right-click] in the Collections tab, and select New Collection from the menu.
Choose Site, New, Collection from the main menu bar.
Drag files from the Files tab into your collection. With the collection selected, use the Inspector palette to attach a query to the collection by clicking the Attach button and then selecting a query from the list (see Figure 9.26). You can also use the buttons in the Inspector palette to run or edit the query.

Figure 9.26 Use the Collection Inspector to permanently attach a query to a collection.
This chapter is from Teach Yourself Adobe Creative Suite, by Mordy Golding (Sams, 2004, ISBN: 067232752X). Check it out at your favorite bookstore today.
Buy this book now. |
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |