Another thread discusses how the bodies of a filtered set of tiddlers could be hidden. This makes me think that maybe the main viewtemplate, i.e $:/core/ui/ViewTemplate , could contain a “hook” (correct term?) to allow external control of the listwidget filter!?
The 5.2.0 release states that “macro parameters can now be used within filter expressions” so I would think it is possible to throw in a generic macro call in filters that would enable this?
But, even more interestingly, maybe such a generic (empty) macro hook could be put into “filters” at core level so it doesn’t have to be manually added by the user?
I have no knowledge how filters are implemented at core level but just maybe there could be something in the processing mechanism that also applies, say, macros in the local tiddler that are defined with a filter
prefix (i.e \define filter-....()
) or some such? Or, to avoid having to modify the very tiddler that the listwidget occurs in, then maybe the macro could be defined/named with the very name of the target tiddler or the very name of a target macro, i.e:
\define filter-$:/core/ui/ViewTemplate() ....
…or…
\define filter-mymacro() ....
This former has the weakness that there might be several filters in the tiddler, and the second that not everything that uses a filter is inside a macro.
Regardless if this idea about remaking how the core processes filters makes sense, what do you think about the idea to include a generic macrocall in core template filters so we can control them without modifying core tids.
Thoughts?