Summary Templates
The summary template is used to display a summary of all the results found on an overlay.
Local knowledge uses two types of summary template About My Property (AMP) and Find My Nearest (FMN).
- About my property (AMP) – used to display information about the current location e.g. what ward am I in? and to display the results of a statistic Knowledge Type.
- Find my nearest (FMN) – used to display a list of found items and display the location on the map e.g. the nearest 5 supermarkets.
Generally AMP displays information about the current location (e.g. what ward am I in?). FMN displays found items on the map (e.g. the nearest 3 schools).
AMP Summary Template
An AMP summary template will be passed an AMP summary object, see AMP Summary Object in the table in JavaScript Objects for available properties.
To understand the construction of the AMP Summary Template, let us first look at the existing template that displays the name of the Police Force.
This uses the Default Local Knowledge definition which is installed with Notice Board.
- Select Templates > Manage Templates.
- From the Manage Templates dialog scroll to find NOTICE_Police Force.
- Click Edit.
- The dialog enables you to type directly in to the edit text area and set standard formatting such as BOLD or Italic font styles from the Format menu.
- The final part of the input calls the result from the overlay in the SWD.
- {Items[0].Attributes[force]} police report:
FMN Summary
An FMN summary template will be passed an FMN summary object, see FMN Summary Object in the table in the JavaScript Objects for available properties.
To understand the construction of the FMN Summary Template let’s take a look at the existing template that displays the nearest 5 supermarkets.
- Select Templates > Manage Templates.
- From the Manage Templates dialog scroll to find Nearest 5 Supermarkets.
- Click Edit.
- In this example the Map Pin is added to the template to match the pin that is used to highlight the location of the returned items on the map.
- The dialog enables you to type directly in to the edit text area and set standard formatting such as BOLD or Italic font styles from the Format menu.
- The final part of the input calls the result from the overlay in the SWD and as this search is returning more than one item you will need to us the Insert Local Knowledge Repeater button to insert the code then add the appropriate column name.
- {Attributes[ColumnName]}