var tids=store.getTaggedTiddlers("tag1", "tag2");

73 views
Skip to first unread message

Michael.Tarnowski

unread,
Nov 5, 2010, 1:45:03 AM11/5/10
to TiddlyWiki
Hi,

I experiment currently with var tids=store.getTaggedTiddlers("tag1",
"tag2", ...); code. I want to generate a table of tiddlers tagged with
tag1 AND tag2 but NOT tag3.
With fET you can do something like

'tiddler.tags.contains("tag1") &&
tiddler.tags.contains("tag2")
&& !tiddler.tags.contains("tag3") && !
tiddler.tags.contains("tag4")'

But in plain Javascript tore.getTaggedTiddlers("tag1", "tag2");
realizes only a boolean OR: the array tids holds all tiddlers tagged
with tag1 or tag2.

Does anyone can set me on track how do something like

var tids = store.getTaggedTiddlers("tag1" AND "tag2");

Thanks
Michael

Eric Shulman

unread,
Nov 5, 2010, 2:16:20 AM11/5/10
to TiddlyWiki
> I experiment currently with var tids=store.getTaggedTiddlers("tag1",
> "tag2", ...); code. I want to generate a table of tiddlers tagged with
> tag1 AND tag2 but NOT tag3.

> Does anyone can set me on track how do something like
> var tids = store.getTaggedTiddlers("tag1" AND "tag2");

First, install:
http://www.TiddlyTools.com/#MatchTagsPlugin

Then, you can write code like this:

var tids=store.getMatchingTiddlers("tag1 AND tag2 AND NOT tag3");

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Michael.Tarnowski

unread,
Nov 6, 2010, 7:07:41 AM11/6/10
to TiddlyWiki
Thanks Eric,
I wasn't aware that MatchTagsPlugin can be used like this.
Cheers Michael
Reply all
Reply to author
Forward
0 new messages