1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-25 04:37:40 +00:00

Add support for positional parameters

This commit is contained in:
jeremy@jermolene.com
2022-04-26 21:55:43 +01:00
parent 31c3abb7ab
commit 9713da5071
5 changed files with 74 additions and 16 deletions

View File

@@ -49,8 +49,9 @@ ParametersWidget.prototype.execute = function() {
}
// Process each parameter
if(transclusionWidget) {
$tw.utils.each(this.attributes,function(value,name) {
self.setVariable(name,transclusionWidget.getTransclusionParameter(name,value));
$tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(self.parseTreeNode),function(attr,index) {
var name = attr.name;
self.setVariable(name,transclusionWidget.getTransclusionParameter(name,transclusionWidget.getTransclusionParameterByPosition(index,self.getAttribute(name))));
});
}
// Construct the child widgets