Is there any way to use list macro to list tags?

118 views
Skip to first unread message

Hao

unread,
Mar 13, 2012, 2:09:04 AM3/13/12
to tiddl...@googlegroups.com
Hi,

I have several tiddler tagged with "A", some tagged with "B".
And I also create tiddler "A" and "B", both tagged with "X".
Now I want to use <<list filter [tag[X]]>>.
It would show a list of tiddlers.
Is there any way to make the tiddler list as a tag instead of a tiddler link?
Essentially, it makes a list
<<tag A>>
<<tag B>>
...

Thanks.

--
Hao



Tobias Beer

unread,
Mar 13, 2012, 4:11:26 AM3/13/12
to TiddlyWiki
Hey Hao,

Looking at the list macro documentation...

http://tiddlywiki.org/#%5B%5Blist%20macro%5D%5D

...you could try this...

<<list filter [tag[SomeTag]] template:SomeTemplate>>

...whereas in a tiddler called SomeTemplate you would add...

*<<view title link>><<tagging>>

Cheers, Tobias.

Tobias Beer

unread,
Mar 13, 2012, 4:16:15 AM3/13/12
to TiddlyWiki
As a sidenote,

In general though, I tend to use InlineJavascriptPlugin for such
purposes since native javascript is a lot more flexible than a core
list function for example. If the thing turns out too complex for
reuse, then I wrap it as a macro. Personally, I think the basics to
get started aren't actually all that tough... and TiddlyWiki provides
a close to perfect playground to play with Javascript.

Tobias.

Tobias Beer

unread,
Mar 13, 2012, 4:18:59 AM3/13/12
to TiddlyWiki
Also, if you haven't seen it yet, the sitemap feature of TagglyTagging
pretty much does all that for you and goes way beyond one sublevel...

http://mptw.tiddlyspot.com/

Cheers, Tobias.

Hao

unread,
Mar 13, 2012, 7:41:56 PM3/13/12
to tiddl...@googlegroups.com
Thanks. This sidenote really helps!
Although I know the InlineJavascriptPlugin, I never thought about it to implement a simple function...
That gives me a brand new way to use TW.

--
Hao

Hao

unread,
Mar 13, 2012, 7:46:17 PM3/13/12
to tiddl...@googlegroups.com
Thanks Tobias.
I know the TagglyTagging, but it seems to be too "complicated", caz I do not need some of it's function.
(It's really a powerful plugin, but I may need more flexibility.)
Therefore I try to use/develop a simpler plugin.

Besides, currently I don't know whether I can customize the TagglyTagging plugin, e.g. only show sitemap/group.

--
Hao

Hao

unread,
Mar 13, 2012, 8:18:23 PM3/13/12
to tiddl...@googlegroups.com
Eh. Maybe I expressed it a little implicit.
What I want to do is actually list tags instead of list tiddlers. 
I want the behavior of each listed item to be the same with a tag. And I installed QuickOpenTagPlugin, which seems to have modified the <<tag "a">> macro.
Now I have created tiddler for each tag with the title to be the tag name, and tagged it with "P". (This is similar with MGSD).
So now I can list the tags by listing the tiddlers tagged with "P".
But the problem is, the listed item is actually a link to a tiddler, without a button to pop up a series of options, as in QuickOpenTagPlugin.

Actually what I want to show besides the tag name are 1) the number of tiddlers tagged by this tag; 2)a button to pop up options "open all tiddlers", "tiddler 1", "tiddler 2".
Is there any way to implement it?
Thanks a lot.

--
Hao

Tobias Beer

unread,
Mar 14, 2012, 12:59:58 AM3/14/12
to TiddlyWiki
The !miniTag script under http://tbgtd.tiddlyspot.com/#scripts might
give you a first example. Some of its code is clearly from other
sources, such as how to display stuff in a popup... so I sure didn't
reinvent that wheel.

It could be easily extended to get the count in there as well. In
terms of complexity, I would probably turn that into a macro these
days.

What might also be interesting to you is some older plugin called
TiddlerListMacro which you can find at http://jackparke.tiddlyspot.com/.
Among other things, it allows for complex templating regarding list
output, with parameters like itemTemplate and groupTemplate.

You can see it being used at:
http://tbgtd.tiddlyspot.com/#journal

Tobias.
Reply all
Reply to author
Forward
0 new messages