Better document requirements of templates, for anyone needing to customise

This commit is contained in:
Graham Triggs 2017-09-08 12:32:48 +01:00
parent bc03e7e52c
commit 75fe93093c

View file

@ -84,10 +84,15 @@ public class FedSearchController extends PagedSearchController {
response.setContentType("text/xml;charset=UTF-8"); response.setContentType("text/xml;charset=UTF-8");
response.setHeader("Content-Disposition", "attachment; filename=search.xml"); response.setHeader("Content-Disposition", "attachment; filename=search.xml");
Map<String, Object> body = new HashMap<String, Object>(); Map<String, Object> body = new HashMap<String, Object>();
body.putAll(rvalues.getMap()); body.putAll(rvalues.getMap());
body.put("serverBase", serverBase); // Note - the template requires the following properties from the above map
body.put("classgroup", classgroup); // querytext
// hitCount
body.put("populationType", getPopulationType(request)); body.put("populationType", getPopulationType(request));
body.put("classgroup", classgroup);
body.put("serverBase", serverBase);
writeTemplate("search-fsresult.ftl", body, request, response); writeTemplate("search-fsresult.ftl", body, request, response);
} catch (Exception e) { } catch (Exception e) {
log.error(e, e); log.error(e, e);