Split summary out of records template MKWS-312
[mkws-moved-to-github.git] / src / mkws-widget-main.js
index 0ee99f3..ac43dcd 100644 (file)
@@ -130,8 +130,9 @@ mkws.registerWidgetType('records', function() {
       }
     }
     var template = team.loadTemplate(that.config.template || "records");
-    var targs = $.extend({}, {"hits": data.hits}, that.config.template_vars);
-    that.node.html(template(targs));
+    var summaryPartial = team.loadTemplate("summary");
+    var tdata = $.extend({}, {"hits": data.hits}, that.config.template_vars);
+    that.node.html(template(tdata, {"partials":{"summary":summaryPartial}}));
   });
 
   that.autosearch();