After returning to Tiddlywiki just recently, I have become more aware of problems I am having when programming tiddlywiki behaviour.
The main issue is : how to refer to tiddlers and/or fields in filters/transclusions through the various brackets, etc…
This is a major issue as understanding this will allow me to make things work.
I appreciate the majority of readers of this list are (very) experienced and probably do not see what the problem is. And before you ask, I have been coding for over 30 years in various languages, so I know how to code.
Don’t just answer with - read the manual! I constantly read the manual but find little actual helpful advice. PMario asked me, in my last question about tiddler titles, what searches have I done to attempt to answer my problem. I can’t tell him as my searches are so many and varied, as in this case.
For example, my current problem is: produce a viewtemplate for tiddlers having a tag People, so that when I access a person’s tiddler, it lists all other tiddlers have the tag ‘the title of the current tiddler’.
For example, I have a tiddler ABC that has a tag Jansen, Bob. Now when I view the Jansen, Bob tiddler that has the tag People, I want to see ABC listed along with all other tiddlers have the tag, Jansen, Bob. Simple request, surely.
I know I can do it by explicitly coding <$list filter="[tag[Jansen, Bob]]" /> in the text field of the Jansen, Bob tiddler. But what I would like is a general solution coded into a viewtemplate tiddler which replaces Jansen, Bob (in the example above) with the title of the current tiddler. In other languages, I would do this by passing a parameter to a function, the parameter being the title of the current tiddler and returning the titles of matching tiddlers for display.
I have spent many frustrating hours so far trying different solutions from examples in the documentation but the solution still escapes me. I am sure it is simple, but can not find any example in the documentation.
If I see a possible example and want to see the actual code, I cant’ because all examples are encoded as, for example, <<.operator-example 1 “[all[shadows]]”>>. Hardly helpful!
I was excited by the possibility of <$list filter="[tag[all[current]]]" /> as the documentation implies that all[current] refers to the title of the current tiddler. Problem solved… but this does not work, yet reading the manual implies to me that it would.
Which returns me to my main issue, the documentation is missing explicit details to how to address tiddlers/fields in filters/transclusions/ filtered transclusions/??
It might include advice on when to use variables or macros/parameters, etc. But all in real world situations.
I would suggest the expanding the tiddlywiki documentation to include real world examples and allow the user to see the actual code in use in context.
If anyone has the solution to my immediate problem, I’d be (nearly) eternally grateful.
bobj