Acquisition
Station
Search
Clients
Collection
Delivery Tools
Compound Object
Creator
Server
Admin
Collection
Admin
Plug-ins

Topics       

 

» Custom Queries and Results

» Web Templates

» Query Builder Tool

» Adding Stop Words

Tutorials

Site Map

Glossary

Contact Us

User Support Center


Modifying Query Builder Templates

Both of CONTENTdm's default templates (results and item display) may be modified. To modify these templates you must have access to the root server directory and you should be familiar with HTML.

The templates are located in the CONTENTdm root server directory, C:\Program Files\Content\Server\docs\qbuild.

Make a copy of the template file you wish to modify so that you will always be able to refer to the original code should you need it. New or modified templates must be saved in the same directory with a new name. When you are ready to use your new templates, simply enter the new template names in the template text boxes in Step 4 of the Query Builder wizard.

Modifying template1.html will change the look of your search results display. Modifying template2.html will change the display of individual items returned from your query. Portions of the templates may be modified, including the color, graphic header, search results tally, and instructions located at the top of the display page.

Search Results Templates

The search results template controls the look of your search results display. Examples of the default search results templates are shown below.

Default search template with thumbnails and titles

Default search template with titles only

Search results templates showing thumbnails and titles or titles only (template1)

The search results default HTML file contains a special marker that designates where the thumbnail images of matching items will be inserted. This marker must appear alone on a line in your HTML file as:

<!-- MARKER -->

An additional, optional marker designates an area where the total number of items retrieved by the search is indicated. If used, this marker must appear as:

<!-- HITS -->

Sample code for a minimal search results template file is shown below:

<html>
<head>
<title>Search results</title>
</head>
<body>
<img src="yourheader.gif">
<h1>Search results</h1>
Your search returned <!-- HITS --> matching item(s)<br>
<!-- MARKER -->
<img src="yourfooter.gif">
</body>
</html>

Item Display Template

The Item Display Template controls the display of individual items returned from your query. The default item display template is shown below.

Default item display template

Default item display template (template2)

The item display HTML file contains a special marker that designates where the item and text description images of matching items will be inserted. This marker must appear alone on a line in your HTML file as:

<!-- MARKER -->

Sample code for an item display template is shown below:

<html>
<head>
<title>View item</title>
</head>
<body>
<img src="yourheader.gif"><br>
<!-- MARKER -->
<img src="yourfooter.gif">
</body>
</html>

For additional information about using the Query Builder Tool, read the tutorial.

Return to top of page


CONTENTdm® is a registered trademark of DiMeMa, Inc.
© 1997-2005 DiMeMa, Inc. All Rights Reserved.

PreviousNext