saqimtiaz / streams

TiddlyWiki plugin for rapid data entry with a keyboard driven workflow. Divide content into smaller tiddlers as you write.
BSD 3-Clause "New" or "Revised" License
58 stars 6 forks source link

Feature request: stream-root-title as a field #5

Closed postkevone closed 4 years ago

postkevone commented 4 years ago

Currently <<stream-root-title>> doesn't work if it is run inside a node tiddler, so having a field root-title like parent could solve this problem.

saqimtiaz commented 4 years ago

@kebifurai any issues you are encountering with using stream-root-title inside a node tiddler have to do with the code you are using it in. This is a standard tiddlywiki variable with nothing special about it and can be used like any other variable in TW.

Your problems are likely due to the fact that your code runs inside an editor toolbar button, which have a different context than the body of a tiddler.

Furthermore, adding this as a field would not make any sense considering that the value of the variable depends on how the node is being displayed. That is, the same node tiddler can have different values for stream-root-title depending on which part of the stream is open in the story river.

In a Stream with nodes: A

If we open the tiddler C, D will have a stream-root-title with value D. If you open tiddler A, the stream-root-title will be tiddler A.

I recommend trying to use targetTiddler and storyTiddler variables instead.