Sure, Yes I ran down a rabbit hole you did not need to go down, Sorry. But you do get to learn more about the rabbit warren.
Regards Tony On Sunday, July 1, 2018 at 1:08:48 PM UTC+10, Marcio Augusto wrote: > > Hino Tony, > Thanks for the detailed explanation. I was just seeing one side of the > coin, did not realize the use case of preserving the calling tiddler title > inside the list, or the nesting of lists. > Regards, > Marcio. > > Em sáb, 30 de jun de 2018 23:26, TonyM <[email protected] <javascript:>> > escreveu: > >> Marcio, >> >> Yes, you are correct in this case it does not matter because the test is >> against the current tiddler and will only list the current tiddler inside >> the list, as in these two examples that have identical outputs >> >> Read on to learn why I suggest it as a rule, otherwise ignore it. >> >> The following are identical with or without the variable set because the >> result is only the current tiddler >> <$list filter="[all[current]tag[Test]]"> >> Current tiddler title = {{!!title}}<br> >> or <<currentTiddler>><br> >> Other field value = {{!!test-field}}<br> >> </$list> >> >> >> <$list filter="[all[current]tag[Test]]" variable="null"> >> Current tiddler title = {{!!title}}<br> >> or <<currentTiddler>><br> >> Other field value = {{!!test-field}}<br> >> </$list> >> >> The difference comes when the filter results in more than one answer, *which >> is not your use case* >> >> For example when two tiddlers are tagged with Test are the results, with >> this changed filter, >> >> <$list filter="[tag[Test]]"> >> <h3>Tiddler {{!!title}}</h3> >> "<<currentTiddler>>" is the each tiddler title >> <h4>~~The calling tiddler details~~</h4> >> Current tiddler title = {{!!title}}<br> >> or <<currentTiddler>><br> >> Other field value = {{!!test-field}}<br> >> </$list> >> >> >> --- >> >> >> <$list filter="[tag[Test]]" variable="tiddlertitle"> >> <h3>Tiddler <<tiddlertitle>></h3> >> "<<tiddlertitle>>" is the each tiddler title >> <h4>The calling tiddler details</h4> >> Current tiddler title = {{!!title}}<br> >> or <<currentTiddler>><br> >> Other field value = {{!!test-field}}<br> >> </$list> >> >> In the first case you no longer have simple access to the calling >> tiddlers details, they are exchanged for the filtered tiddlers (ones tagged >> with Test) >> >> In the second case you retain the calling tiddlers values inside the list. >> >> To access other fields in this second case you can use the view widget >> >> <$view tiddler=<<tiddlertitle>> field="test-field"/> >> >> However in many applications you do not need to reference the >> <<tiddlertitle>> or test-field so I add the variable, but call it null, and >> never use <<null>> >> eg >> <$list filter="[tag[Test]]" variable="null"> >> blah blah >> >> This becomes even more important if you have nested lists multiples >> levels deep, because it allows you to continue referencing the calling >> tiddlers title and fields all the way down. Which in most cases is exactly >> what we want to do. >> >> So as a rule I use the variable=null or another variable name if I *may* >> want access to the containing tiddlers details available inside the list >> widget or nested widgets. >> >> And in your case it makes no difference, so no harm doing it? >> >> <$list filter="[all[current]tag[Test]]" variable="null"> >> MY STUFF GOES HERE >> </$list> >> >> >> Rehards >> Tony >> >> >> >> On Sunday, July 1, 2018 at 6:04:50 AM UTC+10, Marcio Augusto wrote: >>> >>> Hi Tony, >>> >>> I didn't follow here. How setting *variable *helps, if the default is >>> *currentTiddler*? >>> >>> Regards, >>> Marcio. >>> >>> On Friday, June 29, 2018 at 10:15:10 PM UTC-3, TonyM wrote: >>>> >>>> Mark, >>>> >>>> I would think it better to add variable="null" to the list widget since >>>> we know at best the value inside the list will be our targeted tag. >>>> >>>> By using a variable the stuff will remain relavant to the current >>>> tiddler such as field references etc >>>> >>>> Regards >>>> Tony >>>> >>>> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "TiddlyWiki" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/tiddlywiki/1DmYe8JA8Nw/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/tiddlywiki. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/tiddlywiki/31c65657-4fe7-4db1-8592-1aa02bf495ea%40googlegroups.com >> >> <https://groups.google.com/d/msgid/tiddlywiki/31c65657-4fe7-4db1-8592-1aa02bf495ea%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d76f4dcf-0a0c-4d1d-8966-086bf9db78fe%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

