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

Topics       

 

» Custom Queries & Results

» Web Templates

» Query Builder Tool

» Adding Stop Words

Tutorials

Site Map

Glossary

Contact Us

User Support Center


Modifying Custom Queries and Results Web Templates

CONTENTdm default Web Templates are easily modified. To modify these templates you must have access to the docs directory on the CONTENTdm Server and be familiar with HTML, framesets, and JavaScript.

The CONTENTdm Web Templates are located in the docs directory of the CONTENTdm server, /docs/site-templates.

Make a copy of any template files you wish to change so that you will always be able to refer to the original code should you need it. When modifying existing templates, you must retain the existing path and file name of the default templates (shown in the text boxes in Step 4 of Custom Queries and Results).

Specification of Search Results Parameters

Using Custom Queries and Results (CQR), the search results parameters are specified explicitly in Step 4 for each of the four view options (Grid, Bibliographic, Thumbnails, and Titles). CQR generates HTML with your desired settings encoded in parameters named CISOGRID, CISOBIB, CISOTHUMB, and CISOTITLE.

An example of the CQR-generated HTML is shown below:

CQR-generated HTML

The search results parameters like those in the example above govern:

  • the selected fields and display options in the Grid and Bibliographic views;
  • the number of rows and columns of thumbnails in the Thumbnails view;
  • the number of items per page in the Grid, Bibliographic, and Titles views.

Default Templates: Three default template files control the look of the results pages:

  • Browse: /site-templates/browse_results.html
  • Search: /site-templates/search_results.html
  • My Favorites: /site-templates/my_favorites_results.html

At the beginning of each of these HTML files is a section defining the search results parameters for that template. An example of a search parameter is shown below:

Search parameter example

In the example above it can be seen that these are the same parameters produced by Custom Queries and Results: CISOGRID, CISOBIB, CISOTHUMB, and CISOTITLE. The CISOMODE parameter (at the end) denotes the default view option for the page also as specified by CQR. These default settings in the files govern the global view settings in cases where they are not explicitly specified by CQR-generated predefined queries, such as the default browse and advanced search links from the CONTENTdm Web Template standard header.

To specify different values for the default search results parameter settings (even if you choose not to create predefined queries) use CQR to define the desired values and paste the generated code in the Variable Declarations section in the Browse, Search, and My Favorites results files.

When CQR-generated queries specify the settings for the search results parameters in the URLs, these CQR-generated values will override the settings specified in the template files.

Creating Custom CQR Template Files

Step 4 of CQR allows you to specify custom HTML template files to define the look of the results pages.

Tips for creating custom HTML template files:

  • Always start with a copy of the new default template file and customize it to implement the look of your site. Do not attempt to start with your Web page and add in the required elements from the template file, as that will be much more difficult.

  • The default template file for query results is /site-templates/search_results.html.

  • If you have previously-developed template files for the Query Builder and want to use the same look for CQR, start with the new default template file and customize it with the look from the Query Builder template file (and not vice-versa).

  • Do not edit, remove, or reorder any of the comment tags from the CQR template as the software uses these comments to identify sections of the template file where data is inserted.

  • Do not change placeholder text between the comment tags <!-- START OF VARIABLE DECALRATIONS --> <!-- END OF VARIABLE DECLARATIONS -->. Changing the text will have no effect on your templates as it is replaced when results are generated.

  • Please note that DiMeMa will not review or debug modified HTML or script files.

  • See CONTENTdm Web Templates for more information on working with Web Templates.

    Return to top of page


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

PreviousNext