What is a Template?
A template is simply a fragment of HTML with a few custom extensions. Templates are used by Local Knowledge to display results in WebMap.
There are two extensions, <repeater></repeater> and <%sometext%>.
- The <repeater> element is used to repeat sections of the template. The attribute enclosed inside curly braces, {} is the property that will be repeated.
TIP: Repeaters are useful when N type searches are needed in Local Knowledge (eg NearestN or Distance). NearestN is a number type say, nearest 5 schools. The repeater “repeats” or loops the question/search until it finds 5 .
- The <%sometext%> element is used to localise text. The text between <% and %> is a key found in the Cadcorp.Web.Templates.resx file. These tags are processed on the server and the localised text is inserted into the template.
Remember only a document fragment is being created. DO NOT use <html> and <body> tags.