ForEachTiddler - How to get the title of containing tiddler?

27 views
Skip to first unread message

Albertononi

unread,
Sep 4, 2008, 1:06:51 PM9/4/08
to TiddlyWiki
Hi all,

I'm quite new to TiddlyWiki (for my PhD thesis) and I would like to
know how to get and use the name of the containing tiddler (as a
variable) in a <<ForEachTiddler ...>> call.

In other words, I made tiddlers for the philosophers I'm studying
(their name is the title), and I made tiddlers for their books and
papers (tagged respectively as "book" and "article", and both tagging
their author's tiddler) . Now, I would like to use
<<ForEachTiddler ...>> in the philosphers' tiddlers to list their
publications.

Maybe it's not clear... anywhere, thanks for your answers...

Alberto

Amzg

unread,
Sep 4, 2008, 10:28:13 PM9/4/08
to TiddlyWiki
I think you would benefit from Mr.Bairds TagglyTaggingPlugin

...and possibly actually his full varation of TW - i.e MPTW, which I
find more user friendly than default TW. It also has
TagglyTaggingPlugin pre-installed.

Find everything at e.g; http://mptw.tiddlyspot.com/

Good luck!

/Mat

wolfgang

unread,
Sep 5, 2008, 7:02:12 AM9/5/08
to TiddlyWiki
Welcome Albertononi,

> . Now, I would like to use <<ForEachTiddler ...>>
> in the philosphers' tiddlers to list their publications.

Udo gives many examples for the use of ForEachTiddler at his side, for
example:

"List the first 10 tiddlers that have the tag 'basic' in a table with
a header"
"List all open tasks of UdoBorkowski (i.e. all Tiddlers containing
both a 'TaskOpen' and 'UdoBorkowski' tag)"
"Get a comma separated list of all systemConfig tiddlers"
..

...with which it gets easy for non-developers to create custom
ForEachTiddler calls.

> (tagged respectively as "book" and "article", and both tagging
their author's tiddler)

where
'tiddler.tags.containsAll(["Marx","book","article])'

> to list their publications.

write
'((index == 0) ? "" : ", ")+"[["+tiddler.title+"]]"'
>>

Regards,

W.

cmari

unread,
Sep 5, 2008, 7:44:55 AM9/5/08
to TiddlyWiki
If the macro is inside a tiddler titled "Marx" and all the books and
articles are tagged "Marx", you can also use context.inTiddler.title
instead of "Marx",
(see http://tiddlywiki.abego-software.de/#whereClause):
That way you can use the same macro for all philosophers without
having to retype the name in the 'where' statement:
<<forEachTiddler where
'tiddler.tags.containsAll([context.inTiddler.title,"book","article"])'>>
cmari

Albertononi

unread,
Sep 5, 2008, 3:48:18 PM9/5/08
to TiddlyWiki
Thanks everybody!

And thanks cmari, the "context.inTiddler.title" variable is what I was
looking for.
I'll also have a look at MPTW, for it seems appropriate for my
purposes.

I'm loving TiddlyWiki!

Albertononi

On 5 sep, 13:44, cmari <cema...@gmail.com> wrote:
> If the macro is inside a tiddler titled "Marx" and all the books and
> articles are tagged "Marx", you can also use context.inTiddler.title
> instead of "Marx",
> (seehttp://tiddlywiki.abego-software.de/#whereClause):
Reply all
Reply to author
Forward
0 new messages