Help with list filter where tiddler title has spaces

Hello all

I refer to this thread Tiddlytools/Time/Calendar - Help with Events

@EricShulman kindly helped me with this.

I want to modify the following:

!!!One-time events:
<$list filter="[tag[Event]!days:event-date{!!day1}sort[]]-[!days:event-date{!!day2}]">
<$view field=time/><$link/><br>
</$list>

to reference fields day1 and day2 in a specific tiddler, eg

!!!One-time events:
<$list filter="[tag[Event]!days:event-date{EventEditor!!day1}sort[]]-[!days:event-date{EventEditor!!day2}]">
<$view field=time/><$link/><br>
</$list>

The above works fine; however, I cannot get the correct syntax for the case where the tiddler has a space in the title, ie Event Editor

Some help would be very much appreciated.

Cheers, Rob

1 Like

You should be able to just write

!!!One-time events:
<$list filter="[tag[Event]!days:event-date{Event Editor!!day1}sort[]]-[!days:event-date{Event Editor!!day2}]">
<$view field=time/><$link/><br>
</$list>

As a test, if you put the following filtered transclusion in a separate tiddler, does it display the expected field value:

{{{ [{Event Editor!!day1}] }}}

-e

@EricShulman
Indeed, it does work!!

The problem appears to be because, for some unknown reason, the code for the filter in my wiki did have the all-encompassing β€œβ€ β€œβ€.

Can you please explain what the β€œβ€ β€œβ€ do and why the filter worked when it was using the field values from the current tiddler.

FYI, the reason I was changing the code was because I noticed that in a tabbed tiddler it was not working as intended.

Thanks for your help

Cheers, Rob

When content appears in a tabset, the currentTiddler value points to the tiddler in which the tabset is defined (i.e., the tiddler containing the <<tabs ...>> macro). But, when the content within an individual tab uses field references like {!!fieldname}, it needs the currentTiddler value to point to the title of the tiddler from which the tab content is obtained (the β€œtab content tiddler”).

To make it work, there is neat trick. Just add the following to the top of the tab content tiddler:

<$tiddler tiddler=<<currentTab>>>

Then, when that content tiddler is displayed independently in the StoryRiver, the value of <<currentTab>> is undefined, so the $tiddler widget does nothing, and the content tiddler is displayed normally. However, when that content tiddler is displayed within a tabset, the <<currentTab>> value is automatically set by the <<tabs>> macro handler to be the title of the content tiddler. So, by adding the above line of code in that content tiddler, it sets the currentTiddler value to match the currentTab value, and the rest of the content tiddler can then successfully make references using {{!!fieldname}}

-e

Many thanks @EricShulman

That is a neat trick. Makes life a lot easier!

Cheers, Rob