Default Templates

If a specific template is not defined for a layer, default templates will be used by the Local Knowledge service.

There are 5 default templates available:

  • About My Property (AMP) and Find My Nearest (FMN) Summary Template Related Topics Link IconRelated Topics
  • FMN Full Template
  • AMP and FMN Nothing Found Template

Default AMP and FMN Summary Template

Example html using template names:

<div>Found Stuff on {Name}<p></div>

Default FMN Summary Template

Example html:

<div class="FMNSummaryContainer"><i><b><div class="FMNOverlayName">{Name}</div></b></i>
<div class="FMNItemContainer"><repeater {Items} >
<div class="FMNItem"><a href="javascript:zoomToFMNItem({OverlayNo}, '{escape(Name)}')" >{Name}</a>
</div></repeater></div><p></div>

Default AMP and FMN Nothing Found Template

The same Nothing Found Template can be used for the AMP and FMNtemplates. The Nothing Found Template is used if there is no data found in the corresponding Local Knowledge Overlay

Example html:

<div><i><b>There were no results found for<div class="FMNOverlayName">{Name}
</div></b></i><div></br>

Setting the Default Templates for the Service

To set the templates, edits the tables in webMapLayersConfig.db:

  1. Add HTML code to the Templates table
  2. Note TemplateID
  3. Use the TemplateID to define the appropriate template in the ServiceTemplates table.
  4. Define appropriate templates using their TemplateID.

Cadcorp SIS Notice Board 9 will then use the templates defined above if no specific layer templates are defined.

Defining Layer-Specific Templates

Layer-specific templates are defined in a similar way to default templates.

The difference is instead of entering the TemplateID into the ServiceTemplates table, it is added to the Layer Templates table:

  1. Add HTML code to the Templates table.
  2. Note TemplateID.
  3. Use the Template ID to define the appropriate template in the LayerTemplates table.

Ensure the string in the Name column EXACTLY MATCHES the name of the overlay in the LocalKnowledge.swd. If no ID is referenced, the service will use the default template in the ServiceTemplates table.