I have this [[$:/state/kp-showHideBracketContents/view]text[show]] :then[[kp-showHideBracketContents/template/hideBrackets]] :else[[kp-showHideBracketContents/template/showBrackets]] in a tiddler tagged $:/tags/ViewTemplateBodyFilter with a list-before field containing $:/config/ViewTemplateBodyFilters/default.
The intended changes work as expected. How do I restrict this effect only for tiddlers tagged with “Journal” ?
I tried [all[current]tag[Journal][$:/state/kp-showHideBracketContents/view]text[show]] :then[[kp-showHideBracketContents/template/hideBrackets]] :else[[kp-showHideBracketContents/template/showBrackets]]
and also [all[current]tag[Journal]] +[[$:/state/kp-showHideBracketContents/view]text[show]] :then[[kp-showHideBracketContents/template/hideBrackets]] :else[[kp-showHideBracketContents/template/showBrackets]]
but didn’t work.
I’m missing something in the syntax. Pls point me in the right direction.
The “:and” filter run prefix is not really a logical AND, it takes all preceding input and replaces it by the result of its own filter. I think of it as an “eventually” run more than an “and” run.
That’s why your pseudo code doesn’t reflect what happens. If you want a logical AND, just filter more your previous result. That’s what @EricShulman proposes in his solution, and what I also proposed using another method.