1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-04 17:43:00 +00:00

Add subtiddler support to the transclude widget

Useful to be able to reach into plugins. It will enable us to do things
like extract readmes from themes that are not active.
This commit is contained in:
Jermolene
2014-07-17 18:41:20 +01:00
parent ed0bf7aed1
commit f793816dfa
3 changed files with 64 additions and 28 deletions

View File

@@ -39,6 +39,7 @@ Compute the internal state of the widget
TranscludeWidget.prototype.execute = function() {
// Get our parameters
this.transcludeTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
this.transcludeSubTiddler = this.getAttribute("subtiddler");
this.transcludeField = this.getAttribute("field");
this.transcludeIndex = this.getAttribute("index");
this.transcludeMode = this.getAttribute("mode");
@@ -53,7 +54,10 @@ TranscludeWidget.prototype.execute = function() {
this.transcludeTitle,
this.transcludeField,
this.transcludeIndex,
{parseAsInline: parseAsInline}),
{
parseAsInline: parseAsInline,
subTiddler: this.transcludeSubTiddler
}),
parseTreeNodes = parser ? parser.tree : this.parseTreeNode.children;
// Set context variables for recursion detection
var recursionMarker = this.makeRecursionMarker();