Replies: 2 comments 1 reply
-
Hi @Parlazo Tiddlers are always displayed via transclusion, but a simple test that can be used within a tiddler in the story river to check whether it has been transcluded is to compare the variable "storyTiddler" with the variable "currentTiddler". It's not foolproof because it won't detect transclusions that don't change the current tiddler, but it will be sufficient for many cases:
|
Beta Was this translation helpful? Give feedback.
-
Just in case any one is interested, this was an older approach. The drawback of this approach is:
May some one just wants to use such a functionality once, so this is maybe the shorter approach if you are OK with the drawbacks. Thanks to every one. |
Beta Was this translation helpful? Give feedback.
-
How can I enable or disable some parts of a Tiddler depending if it is transcluded or not?
The idea would be some thing like
<<IfTranscluded TranscludedText:'' NotTranscludedText:''>>
or
<<IfTranscluded TranscludedText:'I am transcluded' NotTranscludedText:'I am not transcluded'>>
I did try now a lot with any thing i could guess from regex against <> and <> but some how it did not work in a list (
((?:[\+|\-|\*|\/|\^|\{|\}|\[|\]|\(|\)|\\|\$|\.|\||\?]*))\{(<<currentTiddler>>\?)\|(\1)(\2)\|(\1).*?\|(\1).*?\|(\1).*?\}
)and <<qualified {{!!title}}>> revealing when match to <<qualified {{spaced Title!!title}}>>
may i got all wrong and honestly the whole concept looks confusing to me out of what i get in the docs plugin.
has any one a idea?
Beta Was this translation helpful? Give feedback.
All reactions