Other Features

Custom Queries and Results (CQR)

With minor changes, dmBridge is compatible with CQR generated by the CONTENTdmĀ® CQR generator. The CQR generator returns code pointing to /cdm4/browse.php; this needs to be changed to /dm/objects/ (or wherever your templates are located) to work with dmBridge.

A custom query consists of the URL of a PHP script (/cdm4/results.php) followed by a series of "key-value pairs." Below is a custom query with key-value pairs split apart onto their own lines for readability:


There are quite a few key-value pairs here. dmBridge needs only the ones that begin with CISOOP, CISOFIELD, CISOBOX, and CISOROOT (which mean matching mode, field, search string, and collection alias, respectively). As far as dmBridge is concerned, it's safe to delete the rest, or keep them - it doesn't matter. The above CONTENTdm® CQR converted to dmBridge format would look like:


As you can see, we have dropped anything not starting with CISOOP, CISOFIELD, CISOBOX, or CISOROOT. We have also dropped CISOOP 2 through 4, CISOFIELD 2 through 4, and CISOBOX 2 through 4, because they were empty. (If the CISOOP of a particular number is empty, it and the corresponding CISOFIELD and CISOBOX can be dropped.)

  • CISOBOX is a search string
  • CISOOP is a field matching mode (all, any, none, exact)
  • CISOFIELD is a field nickname
  • CISOROOT is a collection alias

Highlighted Object

The highlighted object can be returned using the dmBridge PHP and HTTP APIs.

To access it using the PHP API, use the dmObject::getHighlighted() method, which returns an object of type dmObject. Example:

= dmObject::getHighlighted();
if (
$obj->isHighlighted()) {
"Yup, I'm highlighted";

To access the highlighted object using the HTTP API, navigate to http://my_cdm_server/dm/api/?r=objects/highlighted.

Random Object

The random object can be returned using the PHP and HTTP APIs.

To access it using the PHP API, use the dmObject::getRandom() method, which returns an object of type dmObject:

= dmObject::getRandom();

To access the random object using the HTTP API, navigate to http://my_cdm_server/dm/api/?r=objects/random. JSON is available by appending .json to the URI. HTTP clients that request JSON as a preferred content type in their HTTP "Accept" header should receive it automatically.

Search Suggestions

dmBridge is able to provide search suggestions from CONTENTdm® field indices based on user input from the HTTP query string. What this means is that you can do something like the following:


And receive a list of suggestions for your term - in this case, "building." Whatever JavaScript solution you use for suggestions should query this URI. dmBridge tries to be client-code-agnostic, and to that end, it leaves the JavaScript up to you.

Search suggestions are a documented feature of the HTTP API. More information about them is available by navigating to your HTTP API documentation, at http://my_cdm_server/dm/api/.

Term Clouds

dmBridge supports "term clouds," which is a broader way of saying that it supports clouds based on social tags (tag clouds), and clouds based on field vocabulary (vocabulary clouds).

A cloud is a visual cluster of words or phrases based on some kind of vocabulary. This vocabulary may be the contents of one or more local metadata fields, or a user-submitted vocabulary ("folksonomy"). dmBridge supports both types. Normally, terms in a cloud have some kind of visual distinction from each other (color and/or size) based on the frequency that they appear in the information corpus. On a web page, these distinctions are controlled by CSS properties like color, font-size, font-weight, etc.

dmBridge is able to generate term clouds based on Dublin Core field vocabulary (see Draw::vocabularyAsCloud()). Social tag clouds are output by Draw::tagsAsCloud(). Both classes output tags as HTML anchor (&lt;a&gt;) elements with no enclosing element. These elements receive a CSS class attribute of dmTagX, where X is an integer from 1 to 10. With social tags, all tags are output with the same class of dmTag.


The dmBridge template engine supports the Sitemaps standard, which is designed to help search engines (including Google, Yahoo!, and Bing) index your content.

By default, your sitemap index is located at /dm/objects/?r=sitemap. To inform search engines about its location, modify the "Sitemap" element in robots.txt, located at the root of your template engine folder (by default, /dm/objects). Note that the format of the robots.txt file is picky and you might want to use a validation tool on it afterwards.