Trying to use a filter instead of wikify

Hello All:

I want to put together a filter that returns a keyword if one or more tiddlers have a title that begins with that keyword.

Example 1 below show a filter that works for a single predefined keyword

<<.operator-example 1 "[enlist[repair]] +[search:title:anchored[repair]count[]compare:number:gt[0]then[repair]]">>

What I would like to do is to have a filter that performs the same action for an arbitrary list of input keywords.

Example 2 below shows the general idea but doesn’t work.

<<.operator-example 2 "[enlist[repair research zerg]] +[search:title:anchored<currentTiddler>count[]compare:number:gt[0]then<currentTiddler>]">>

I ultimately want to used the filtered keyword lists to generate a series of tabs where each tab generates a list of tiddlers that match a keyword while avoiding keywords that have no matches.

Something like …

<<tabs tabList="[enlist[repair research zerg]] +[search:title:anchored<currentTiddler>count[]compare:number:gt[0]then<currentTiddler>]">>

I do have a workaround that uses wikify but I would prefer to use a filter instead.

Thanks
Steve

[ADMIN-EDITED: for code blocks]

[enlist[repair research zerg]] :filter[all[tiddlers]prefix<currentTiddler>]

1 Like

Saq

That does the job and works with tabs

<$macrocall $name="tabs" tabsList="[enlist[piffle repair research zerg]] :filter[all[tiddlers]prefix<currentTiddler>]"/>

Thanks!

Keep in mind in talk.tiddlywiki you need to wrap any code you share in single backticks or tripple backticks or we cant read the code correctly.