Use image-display template.
authorMike Taylor <mike@indexdata.com>
Thu, 3 Apr 2014 16:02:43 +0000 (17:02 +0100)
committerMike Taylor <mike@indexdata.com>
Thu, 3 Apr 2014 16:02:43 +0000 (17:02 +0100)
examples/htdocs/mike.html

index 9179cb6..9dedd33 100644 (file)
     <script type="text/javascript" src="http://x.mkws.indexdata.com/handlebars-v1.1.2.js"></script>
     <script type="text/javascript" src="http://x.mkws.indexdata.com/pazpar2/js/pz2.js"></script>
     <script type="text/javascript" src="http://x.mkws.indexdata.com/mkws.js"></script>
+    <script class="mkwsTemplate_Summary" type="text/x-handlebars-template">
+      <a href="#" id="{{_id}}" onclick="{{_onclick}}">
+        {{#first md-thumburl}}
+         <img src="{{this}}" alt="{{../md-title}}"/>
+        {{/first}}
+       <br/>
+      </a>
+    </script>
   </head>
   <body>
-    <div class='mkwsRecord' autosearch='kitten' targetfilter='udb==Google_Images'></div>
+    <div class='mkwsRecord' autosearch='kitten' targetfilter='udb==Google_Images'>Kitteh!</div>
     <div id="mkwsSwitch"></div>
     <div id="mkwsTargets"></div>
     <div id="mkwsStat"></div>