I will second marks comment.
I often use variable=nul to indicate I will not be using the the result
within the list, for example when using list to determine when something is
displayed, and especially if inside the list I want access to
currentTiddler (the containing tiddler), particularly in the view template.
As soon as I decide to make use of the variable within the list I give it a
name that represents what it is that is being listed. Thus returning to my
code later I always see if I use nul that I do not care about the value, if
I see no variable I am using currentTiddler (Equivalent to
variable=currentTiddler) and if I use a named variable (other than nul) the
name reflects what in fact the list is doing/listing eg;
variable=closed-task.
The same variable name can be used inside a list but its value only changes
within that list, once the list is closed the variable will return to its
original value.
Regards
Tony
On Monday, October 7, 2019 at 6:57:05 AM UTC+11, Mark S. wrote:
>
> If you didn't set the variable, then <<currentTiddler>> would contain
> whatever the inner list widget returns. Instead it uses whatever the outer
> list widget returns.
>
> Sometimes in this situation I use variable="dummy" to remind me that the
> variable doesn't do anything.
>
>
> On Sunday, October 6, 2019 at 12:48:02 PM UTC-7, A Gloom wrote:
>>
>> Overcame the last hurdle holding up "Searchin high n low" and it was
>> fixed with... kaos coding (cause I didn't knowing did it-- goes against
>> what i would do) so I can truly say my wiki has "KAOS inside"
>>
>> The " variable="" " in the list widget below was initially put in to use
>> but never was-- so its not being used by the list-- but if I remove it, the
>> list breaks. As long as it remains, regardless of the variable name used
>> or left empty, the list works-- hence the kaos value.
>>
>> <$set name="urlfinal" value={{$:/temp/refwikiurl}}>
>> <div style="margin-bottom:10px; padding:0px 0px 4px 10px; border:dotted
>> 2px;">
>> <<refwikiurlfinal>><br/>
>> <$list filter="[[reference wikis bookmarks]indexes[]]" >
>> <$list filter="[[reference wikis
>> bookmarks]getindex<currentTiddler>search:title{$:/temp/refwikiurl}]"
>> variable="kaos">
>> <<currentTiddler>>
>> • ''Version:'' <$view tiddler="reference wikis bookmarks version"
>> index=<<currentTiddler>>/><br/>
>> • ''Has:'' <$view tiddler="reference wikis bookmarks material"
>> index=<<currentTiddler>>/><br/>
>> <$set name="data" tiddler="reference wikis bookmarks toc" index=<
>> <currentTiddler>> >
>> Table of contents: <br/><$select tiddler='$:/temp/refwikitoc'
>> default=""><$list filter=<<data>>+[encodeuri[]]><option value=<
>> <currentTiddler>>><$view field="title" format="text" /></option>
>> </$list></$select><br/>
>> </$set></$list>
>> </$list>
>>
>>
>>
>> For the uninitiated: KAOS/kaos = *K*ats *A*gainst
>> *O*rganization and *S*anity* (formerly Kittens)*
>>
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/6c81f53d-7754-4600-9eb1-65fe695fe8fa%40googlegroups.com.