diff --git a/core/modules/widgets/transclude.js b/core/modules/widgets/transclude.js index e2f2e78dc..1af7f9c42 100755 --- a/core/modules/widgets/transclude.js +++ b/core/modules/widgets/transclude.js @@ -75,17 +75,8 @@ TranscludeWidget.prototype.execute = function() { ]}]; } } - // Assign any variables set via attributes starting with $ - var variables = Object.create(null); - $tw.utils.each(this.attributes,function(attribute,name) { - if(name.charAt(0) === "$") { - variables[name.substr(1)] = attribute; - } - }); // Construct the child widgets - this.makeChildWidgets(parseTreeNodes,{ - variables: variables - }); + this.makeChildWidgets(parseTreeNodes); }; /* @@ -112,7 +103,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of */ TranscludeWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - if($tw.utils.count(changedAttributes) || changedTiddlers[this.transcludeTitle]) { + if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedTiddlers[this.transcludeTitle]) { this.refreshSelf(); return true; } else { diff --git a/editions/tw5.com/tiddlers/widgets/TranscludeWidget.tid b/editions/tw5.com/tiddlers/widgets/TranscludeWidget.tid index c28e44432..0501d7091 100644 --- a/editions/tw5.com/tiddlers/widgets/TranscludeWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/TranscludeWidget.tid @@ -1,5 +1,5 @@ created: 20130824142500000 -modified: 20210319150601867 +modified: 20140717175900970 tags: Widgets title: TranscludeWidget type: text/vnd.tiddlywiki @@ -17,7 +17,6 @@ The TranscludeWidget dynamically imports content from another tiddler. |index |The index of a property in a [[DataTiddler|DataTiddlers]] | |subtiddler |Optional SubTiddler title when the target tiddler is a [[plugin|Plugins]] (see below) | |mode |Override the default parsing mode for the transcluded text to "block" or "inline" | -|//(attributes starting with $)// |<<.from-version "5.1.24">> The $ is removed from each attribute name to specify a variable name that is assigned the specified value for the scope of the transclusion | The TranscludeWidget treats any contained content as a fallback if the target of the transclusion is not defined (ie a missing tiddler or a missing field).