You can wrap the contents of the tiddler in a list widget so that it’s effectively only displayed when the filter condition is true:
<$list filter="[<currentTiddler>tag[foo]] ~[<currentTiddler>tag[bar]]">
... ViewTemplate contents ...
</$list>
I’m using the :else/~
filter run prefix here to make sure that the second condition is only tested if the tiddler doesn’t have the tag “foo”—this is important because otherwise, the template will display twice on any tiddler with both tags!
Here’s an alternate filter that achieves the same result; it may be more concise, especially if you want to add more tags to test. In this case, we’re using +[limit[1]]
to prevent multiple display.
"foo bar [[multiword tag]] :intersection[<currentTiddler>tags[]] +[limit[1]]"