![]() | ||||||||
| ||||||||
|
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 ParametersUsing 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:
The search results parameters like those in the example above govern:
Default Templates: Three default template files control the look of the results pages:
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:
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 FilesStep 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:
See CONTENTdm Web Templates for more information on working with Web Templates. CONTENTdm® is a registered trademark of DiMeMa, Inc. |
|||||||