Reference widget passes the configuration item "paragraphs" into the
authorMike Taylor <mike@indexdata.com>
Thu, 29 May 2014 15:21:34 +0000 (16:21 +0100)
committerMike Taylor <mike@indexdata.com>
Thu, 29 May 2014 15:21:34 +0000 (16:21 +0100)
mkws-paragraphs helper, specifying how many paragraphs to render. If
this is absent (or zero), all paragraphs obtained from the target are
rendered.

src/mkws-widget-reference.js

index 74763d7..041d9e4 100644 (file)
@@ -12,7 +12,7 @@ mkws.registerWidgetType('Reference', function() {
 {{#if md-title-responsibility}}\
   <i>{{md-title-responsibility}}</i>\
 {{/if}}\
-  {{{mkws-paragraphs md-description}}}\
+  {{{mkws-paragraphs md-description ' + this.config.paragraphs + '}}}\
   <p class="mkwsCredit">Wikipedia</p>\
 ');
 });