The Credo widget's Reference subwidget is now passed a "paragraphs"
authorMike Taylor <mike@indexdata.com>
Thu, 29 May 2014 15:22:40 +0000 (16:22 +0100)
committerMike Taylor <mike@indexdata.com>
Thu, 29 May 2014 15:22:40 +0000 (16:22 +0100)
parameter of 1, so that only the first paragraph of the Wikipedia
article is used.

examples/htdocs/mkws-widget-credo.js

index a41ec88..59a9a13 100644 (file)
@@ -44,7 +44,7 @@ mkws.registerWidgetType('Credo', function() {
 
   s.push('<td class="main">');
   s.push(section('encyclopaedia', 'Topic Page: <span class="x-mkws-title"/>',
-                 this.subwidget('Reference', { _team: 'ref' })));
+                 this.subwidget('Reference', { _team: 'ref', paragraphs: 1 })));
   // The Images widget needs to be in our team so we can set its template
   s.push(section('image', 'Images',
                  this.subwidget('GoogleImage', { maxrecs: 4, template: 'CredoImage' })));