Thomas Register
Custom e-Catalog Specifications

Display Types

TYPE=template

Using the local syntax, results of Custom e-Catalog calls will display in the location they are coded into a file. Following the links from within those results (product number links in 'type=list' calls, for example), will display the subsequent results (a details page) in the same place.

Using the portable syntax, the results of Custom e-Catalog calls will display in an otherwise empty screen. This is the reason the original specifications suggested that external sites be developed in a framed environment to preserve navigation.

'TYPE=template' allows a page to be specified into which the results of a Custom e-Catalog call are displayed. The specified template "wraps around" the results, allowing the "look and feel" and the balance of the site to be maintained while displaying the results in a more appropriate manner.

Defining a template requires two steps.

First, define an HTML file that is to serve as a template in which the results of Custom e-Catalog calls are to display. Do this by inserting the following code in the location where the results should appear:

Local Syntax

<!-- SMARTCAT START

      AZ=xxxxxxxx
      TYPE=template

      SMARTCAT END -->

Portable Syntax

      <!-- CeC Template --> 
Note: The <!-- CeC Template --> tag must be on a separate line, not flanked by other HTML tags.

Portable Correct

           <td colspan="2"> 
           <!-- CeC Template -->
           </td>
Portable Incorrect

           <td colspan="2"><!-- CeC Template --></td>



Then, insert the optional 'TEMPLATE=filename.htm' tag in a Custom e-Catalog call in the file that is to utilize the template that has been defined.

For example, to use a template to display the results of a list call, use the following code, where 'filename.htm' is the template file defined in the first step:

Local Syntax

<!-- SMARTCAT START

      AZ=xxxxxxxx
      TYPE=list
      PART=ABC
      PART=DEF
      PART=GHI
      TEMPLATE=filename.htm

      SMARTCAT END -->

Portable Syntax

      <a href="smartcat.cgi?az=xxxxxxxx&type=list&template=http://www.yoursite.com/filename.htm&ptno=ABC+DEF+GHI">
When creating a template using the portable syntax on a remotely (non-Thomas Register) hosted site, all file and image references must be defined by their absolute URLs. For example, if an image on the external site is referenced as:
      <img src="graphics/image.gif">
in the page defined as the template the full URL must be provided:
      <img src="http://www.yoursite.com/graphics/image.gif">

When the 'TYPE=list' call is executed, the results display in 'filename.htm' at the location of the 'TYPE=template' or <!-- CeC Template --> call.

Templates can be used in conjunction with the 'TYPE=index, index_order, heading, heading_order, list, list_order, details, details_order, search, and search_order' calls.

Copyright © 2002 Thomas Publishing Company