Problem when transcluding a tiddler

Hello

I have a wiki with a number of tiddlers each representing an event.
A tiddler named Forthcoming Events has a filter to list all future events as follows:

<$list filter=[tag[Event]!days:event-date[1]sort[]]-[days:event-date{!!day2}]>

Field day2 is a field in Forthcoming Events

The above works as intended.

Another tiddler Event Editor contains the following:

''Future Events''

<$transclude $tiddler="Forthcoming Events" $mode="block"
</>

The above however does not show the events. Presumably this is because field day2 is in another tiddler, but I have been unable to find a way to resolve the issue.

An added complication is that Event Editor is a tab in another tiddler called Editors and so there presumably needs to be some further code using currentTab to make the events appear when the tab is selected.

Please can someone help to resolve these two issues.

Cheers, Rob

Notes and possibly a Quick answer;

  • Surely this actualy reads <$list filter="[tag[Event]!days:event-date[1]sort[]]-[days:event-date{!!day2}]"> ie has the quotes?
  • Use different closure <$transclude $tiddler="Forthcoming Events" $mode="block"/> or <$transclude $tiddler="Forthcoming Events" $mode="block"</$transclude>

Transclude can be thought of as applying a template. It acts on the current tiddler.

Could this perhaps help?

<$let currentTiddler="correct title">
   <$transclude $tiddler="Forthcoming Events" $mode="block"></$transclude>
</$let>

Hi @TW_Tones

Many thanks for your comments. I had omitted the quotes in the filter. Why it worked as expected I don’t know but I have corrected that and as a result I had to rewrite the filter to get it to work as intended, as follows:

<$list filter="[tag[Event]days:event-date{!!day2}]-[days:event-date[1]]">

I also corrected the transclusion closure error.

I have found that if I use the code you suggested the transclusion does not work; a > must be inserted after "block"

Everthing now works as I intended, so thanks again for your help.

Cheers, Rob

Correct, Sorry. That delimits the beginning of the transclude widgets content, often not used, however it is used if the transclude is empty. I will fix it in my last reply.