mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-02-17 07:29:49 +00:00
Compare commits
1 Commits
debugging-
...
yet-more-m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
add7f26f04 |
@@ -25,7 +25,7 @@ Render this widget into the DOM
|
||||
*/
|
||||
TranscludeWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
this.computeAttributes({asList: true});
|
||||
this.execute();
|
||||
try {
|
||||
this.renderChildren(parent,nextSibling);
|
||||
|
||||
@@ -377,6 +377,7 @@ Widget.prototype.makeFakeWidgetWithVariables = function(variables) {
|
||||
Compute the current values of the attributes of the widget. Returns a hashmap of the names of the attributes that have changed.
|
||||
Options include:
|
||||
filterFn: only include attributes where filterFn(name) returns true
|
||||
asList: boolean if true returns results as an array instead of a single value
|
||||
*/
|
||||
Widget.prototype.computeAttributes = function(options) {
|
||||
options = options || {};
|
||||
@@ -389,7 +390,7 @@ Widget.prototype.computeAttributes = function(options) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
var value = self.computeAttribute(attribute),
|
||||
var value = self.computeAttribute(attribute,options),
|
||||
multiValue = null;
|
||||
if($tw.utils.isArray(value)) {
|
||||
multiValue = value;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
title: MultiValuedVariables/TranscludeParameterDirectly
|
||||
description: Multi-valued variable passed as procedure parameter via {{{filter}}} syntax
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
\procedure showItems(itemList)
|
||||
<$text text={{{ [(itemList)join[-]] }}}/>
|
||||
\end
|
||||
|
||||
<$transclude $variable="showItems" itemList={{{ [all[tiddlers]sort[]] }}}/>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>$:/core-ExpectedResult-Output</p>
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user