You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The transclude method [1] of the tiddler macro works so that if the same tiddler is to be transcluded "twice" (inside itself) [2], then it is not transcluded for the second time. This is done, obviously, to avoid loops. However, it can be desirable (and is desirable for me) to insert same templates with different parametrization one in another.
(here goes the sublist which is to be displayed inside List1 as well)
The main issue is -- it's impossible to get the sublist shown without overwriting the config.macros.tiddler.transclude method. When I do this with a plugin, I get problems with other plugins (at least I have to add the Require slice to those which hijack config.macros.tiddler.transclude).
How to fix this in a backward-compatible way?
Well, a simple way would be to change config.macros.tiddler.transclude a bit, namely substitute the lines 223 [2] with this:
Then, changing config.options.transclusionsNestLimit would allow to define the possible depth of transcluding a tiddler into itself. This is a well-tested solution which I use these days (via a plugin that overwrites config.options.transclusionsNestLimit), so it would be nice to get that in the core.
Of'course, a good fix will also contain the description of the option (in config.optionsDesc), too.
The transclude method [1] of the tiddler macro works so that if the same tiddler is to be transcluded "twice" (inside itself) [2], then it is not transcluded for the second time. This is done, obviously, to avoid loops. However, it can be desirable (and is desirable for me) to insert same templates with different parametrization one in another.
A (shortened) example..
tiddler ListTemplate
(transclusionText inserts the
<<tiddler [[tiddler.title]]>>
thing, writing in a non-formal notation)tiddler List1
(here goes the main list)
tiddler Item1 tagged with
someTag
(here goes the sublist which is to be displayed inside List1 as well)
The main issue is -- it's impossible to get the sublist shown without overwriting the
config.macros.tiddler.transclude
method. When I do this with a plugin, I get problems with other plugins (at least I have to add the Require slice to those which hijackconfig.macros.tiddler.transclude
).How to fix this in a backward-compatible way?
Well, a simple way would be to change
config.macros.tiddler.transclude
a bit, namely substitute the lines 223 [2] with this:Then, changing
config.options.transclusionsNestLimit
would allow to define the possible depth of transcluding a tiddler into itself. This is a well-tested solution which I use these days (via a plugin that overwritesconfig.options.transclusionsNestLimit
), so it would be nice to get that in the core.Of'course, a good fix will also contain the description of the option (in
config.optionsDesc
), too.[1] https://github.com/TiddlyWiki/tiddlywiki/blob/master/js/Macros.js#L217
[2] https://github.com/TiddlyWiki/tiddlywiki/blob/master/js/Macros.js#L223
The text was updated successfully, but these errors were encountered: