Thanks Eric, I will have a look for your code patterns in use, but rather than a general interactive solution I want to build a specific interactive solution.
- The key desire is to modify the filter(s) used in a single list widget.
- I am trying to get a code pattern that can be used by the community for a class of solutions not currently supported in tiddlywiki.
Example;
Imagin you have a project view that lists a range of resources for the project, perhaps any project related item has the project names tag. We will have tasks, done tasks, references, guides etc… with a range of methods used, field/values, tags or even field existence vs containing a date stamp eg done-date.
- So the “root filter” would be
[tag[<currentTiddler>]
where current tiddler is a project name.
- Lets say I want a single list of items by default it would be tasks not done
[tag[<currentTiddler>] -[tag[task]has[done-date]]
- Or done items
[tag[<currentTiddler>] +[tag[task]has[done-date]]
- Or references (not archived)
[tag[<currentTiddler>] +[tag[reference]!has[archive-date]]
- But then we may want to show in created order
[tag[<currentTiddler>] +[tag[reference]!has[archive-date]] +[!sort[created]]
I would like to allow the user to simply select/check to add a named filter to the single list filter to get whatever result they want. Thus they could even mix tiddlers such as tasks and references.
- They will not see the filters needed or generated, just select what they want.
The above is a real example I hope to use, but the reason I want to find a way to build the filters for use in an existing list filter is because I want to build such selection capacity into parts of the core. for example consider $:/tags/ViewTemplate iterated in $:/core/ui/ViewTemplate
- Currently the filter is
[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]
- I would for example like to provide a way to select say “bottom tags” wich would alter the above filter to have appended to it, the following filter;
-
=$:/core/ui/ViewTemplate/tags +[putafter[$:/core/ui/ViewTemplate/body]]
which would also display the tags below the body
- Or “hide tags” may append the filter
-[[$:/core/ui/ViewTemplate/tags]]
The extended dream here is to allow each tiddler, or a class of tiddlers, to customise what they see, or the order of the elements presented by the view template. While still respecting additional elements introduced by the use of $:/tags/ViewTemplate.
I could see a similar selection process applied to a dynamic table.
[Edited] I may also like to add filters to the single filter that include conditions, for example;
- Display an additional tags view to tiddler listing more than N items