How to create a field macro similar to the tag macro

This sounds like an approach I take where I define a display-filter for example;

<$list filter="[{$:/config/author-mode}match[yes]]" variable=~>
   optional content for authors
</$list>
  • The question do we do a display-filter test inside or outside the elements, or in each of the dropdown items?

Keep in mind a filter-pill can also use a [tag[tagname]] filter such as [tag[todo]!tag[done]] and a label of tagname, so it starts to look like a filtered “tag pill”.

I have added the count on the filter-pill you can override with show-count:"no"

Snag_18f3fd3

@TW_Tones Is your most developed version of filter-pill, with the beautiful icon and all, previewed in image form here…
Snag_18f3fd3
… available somewhere as a plugin or demo site, so that we can neatly link to it and be sure we have the latest and most complete version?

This is the kind of thing for which I’m happy to toss some coins in your hat, and would encourage others to do the same. Your contributions have really enhanced what TW can do! :wink:

-Springer

I will review this today

1 Like

@Springer

I found a newer version, and I surprised myself how good it is, It allows a pill similar to a tag pill but driven by a filter, and with lots of options on the tag pill.

However since filters are more general in nature you can;

  • Create ANY filter pill
  • Reproduce tag pills
  • A custom tag pill (with label)
  • Create field pills

Snag_5df539

Here is the current Version as requested, but I think I will package this and start a new thread to promote it.

filter-pills.json (11.5 KB)

This is a result of a number of contributors which I extended even further.

5 Likes