Using the Query Builder Tool

The CONTENTdm Query Builder wizard leads you through the process of defining CONTENTdm queries that can be integrated into Web pages. We recommend that users of the Query Builder Tool have experience with HTML and building Web pages.

The Query Builder Tool generates HTML code for predefined collection queries based on settings you specify in a few simple steps. Copy and paste the HTML code into Web pages from which users will search your collection.

Create a Query

A.In your Web browser address bar type the following:

This opens the Query Builder wizard.

B.Check the radio button next to the type of query you want to create.

1. Simple hyperlink. Create a simple hyperlink may be defined to specify a single query. Because CONTENTdm is Web-based, all queries to collections have an associated URL that can be linked to from your Web pages.

2. Pull-down list. Define a pull-down list to specify a number of queries that can be selected by the user.

3. Text box. Create a text box so that users can enter search words for querying the collections. The search may be across single fields or across all fields within a collection.

  1. Browse collection. Define a page so users are able to browse all items in a collection without formulating a specific query.

Click Next to proceed to Step 2 of the Query Builder wizard.

C.Check the box next to your collection name.

Click Next to proceed to Step 3 in the Query Builder wizard.

D.From the pull-down list, select a field to search. In the search words text box, type your search

terms. Finally, specify whether the search should retrieve:

1

Building Queries

1. all matching words using implied AND
(denny and regrade)
2. any matching words using implied OR
(steamship* or wheelers or steamboat*)
3. perform an advanced search using
Boolean operators that you specify
(Green and lake or Greenlake)
(capitol not central)
For our example we chose implied AND
for the words “World Fair” /

1

Building Queries

E.Click Preview to test your query. The results template opens to display your search results. If your search

produced no results, go back and modify your query. If you are satisfied with the results click Next to

proceed to Step 4 of the Query Builder wizard where you will configure the link to the results

templates.

NOTE:

If you selected the “textbox” query, Step 3 will be different. You will only need to define your query

by selecting which field to search.

NOTE:

If you selected the “Browse page” query, Step 3 will be different. You can choose to display a page with

thumbnail images or one with only the titles listed.

F.In Step 4 of the Query Builder wizard the path and file name of the two defaults are displayed in

textboxes. Enter the path and file names of the templates in the appropriate textbox. (We will

supply these to you because these pages will reside on the Libraries’ server.)

G. Specify the display format by selecting Show thumbnails and titles or Show titles only. In each case

you can further define the display by specifying the number of results returned on a single page.

To view the results page, click Preview. The results page display options with the default templates

are shown below.

Formatted for thumbnails and titles.

Formatted for titles only

H.If you are satisfied with your settings, click Next to generate the HTML code for your chosen

configuration. Copy the code and paste it into your HTML pages where you want the query to appear

If you chose Simple hyperlink you will generate a single URL to cut and paste as a link in your web page (for either text or an image).

If you chose Pull-down list you will generate code to paste as a form in your web page.


If you chose Text box you will generate code to paste as a keyword search box in your web page.

If you chose Browse collection you will generate a single URL to paste into your web page. You can also choose to add “browse all items” as an option in a pull-down list by simply using a search term that is common to all items in your collection.

Examples:

Technical Note:

For your queries to work from pages on your web site you will need to use the full URL wherever there is a call to the /cgi-bin directory. This is necessary because the CONTENTdm databases are on the Libraries server and not your own.

For testing your queries you will need to use the development URL. When your collection goes live you will need to modify this URL to point to the production server by removing the “-dev” from it.

e.g.

Will become

Adding the Advanced Search link

To enable the Advanced Search option you will need to provide a link on your web site. This link will open a new browser window.

1. Use the following links, replacing the “imlsmohai” portion with your collection location *

For testing:

<a href= target=“_blank”>Advanced Search</a>

When going live:

<a href= target=“_blank”>Advanced Search</a>

When this link is clicked a new browser window will open displaying the CONTENTdm Advanced

Search application.

*imlsblackhs

imlseastside

imlsmaritime

imlsmohai

imlsmvhs

imlsrailway

imlsrenton

imlsrvhs

imlsshoreline

imlswingluke

imlswrvm

1

Building Queries