List with title

205 views
Skip to first unread message

Chems

unread,
Aug 26, 2019, 10:22:28 AM8/26/19
to TiddlyWiki
Hey,

I wanna create a bunch of tiddlers with lists in them.
The list will show tiddlers, in wich the titel of the current tiddler is a field value.

For example:
Tiddler 1
Titel = Apple
field ingrediant = Apple

Tiddler 2
Titel = Cookbook
<<list-links "[has[ingrediant]ingrediant[Apple]]">>

Now Tiddler 2 will display Tiddler 1. Thats what I want, but I always need to change the "Apple" to sth else.
Is there a way to display a list, which is referring to the tiddler title?

So That Tiddler 2 will look like:

Tiddler 2
Titel = Cookbook
<<list-links "[has[ingrediant]ingrediant[TITLE]]">>


Thank you in advanced!



Mark S.

unread,
Aug 26, 2019, 10:50:10 AM8/26/19
to TiddlyWiki
Possibly you want the "get" operator:

<<list-links "[has[ingrediant]get[ingrediant]]">>

But this will list all ingredients used by all recipes. But it would be an odd cookbook that listed all
ingredients used in all it's recipes.

Chems

unread,
Aug 26, 2019, 3:58:12 PM8/26/19
to TiddlyWiki
Hey Thanks!

The cookbook was just an example!
Is there not a "simple" way to insert the title in the way I would like it to be?
So
<<list-links "[has[ingrediant]ingrediant[Apple]]">>
So that the [Apple] will be the titel of the tiddler; things like
<<list-links "[has[ingrediant]ingrediant[!!!title]]">>, etc dont work.

Mark S.

unread,
Aug 26, 2019, 4:25:36 PM8/26/19
to TiddlyWiki
In your example, the tiddler was "Cookbook". So how would the list-links know what OTHER tiddler you meant? It could
be one of dozens.

But if you meant to list all recipes that used an ingredient, then you might put this
inside your ingredient tiddler:

<<list-links "[has[ingrediant]ingrediant<currentTiddler>]">>

This will list all the other tiddlers that use that ingredient.

And if this is something that you want to list for everything that is an official
ingredient, perhaps tagged as "Ingredient", then you would make a template
tiddler, tagged as $:/tags/ViewTemplate with contents like:

<$list filter="[all[current]tag[Ingredient]]">
<<list-links "[has[ingrediant]ingrediant<currentTiddler>]">>
</$list>

Good luck!

Chems

unread,
Aug 27, 2019, 9:52:23 AM8/27/19
to TiddlyWiki
Sorry; Maybe my example was not completly clear.

My Problem is that I need to write the
<<list-links "[has[ingrediant]ingrediant[Apple]]">>
for every other Fruit.

So, If i have 100 tiddlers all called after Fruits,
I have to write the list above, and exchange the "Apple" with the title of the tiddler. It would be so much easier if I dont need to do 
all this manually, but have a command that will insert the title of the tiddler into the list I am trying to create.
<<list-links "[has[ingrediant]ingrediant[TITLE]]">>

Does this still sound like gibberish? :D

Chems

unread,
Aug 27, 2019, 9:52:24 AM8/27/19
to TiddlyWiki
Sorry; Maybe my example was not completly clear.

My Problem is that I need to write the
<<list-links "[has[ingrediant]ingrediant[Apple]]">>
for every other Fruit.

So, If i have 100 tiddlers all called after Fruits,
I have to write the list above, and exchange the "Apple" with the title of the tiddler. It would be so much easier if I dont need to do 
all this manually, but have a command that will insert the title of the tiddler into the list I am trying to create.
<<list-links "[has[ingrediant]ingrediant[TITLE]]">>

Does this still sound like gibberish? :D

Am Montag, 26. August 2019 22:25:36 UTC+2 schrieb Mark S.:

Anjar

unread,
Aug 27, 2019, 10:28:15 AM8/27/19
to tiddl...@googlegroups.com
It sounds like you are looking for some kind of nested list? For example
<$list filter="[has[ingredient]]">
<$set name=ing value={{!!title}}>
<<list-links filter:"[ingredient<ing>]">>
</$set>
</$list>

which will find all tiddlers with a field named "ingredient" and then use the title of that tiddler ("Apple") to create a list of tiddlers with a field ingredient with value "Apple"


Best,
Anders

Chems

unread,
Aug 27, 2019, 3:07:00 PM8/27/19
to TiddlyWiki
I dont think thats quiet what I want, but thanks nevertheless!

Maybe its not possible with tiddlywikki as easy as I expected it to be.

I just want the
<<list-links "[has[ingrediant]ingrediant[TITLE]]">>

function with the current tiddlertitle in the last brackets.

Maybe Im just bad at describing my ideas in english :D

Mark S.

unread,
Aug 27, 2019, 3:16:04 PM8/27/19
to TiddlyWiki
This post:


Described how to do what you appear to be asking. Note that to have this occur automatically in every tiddler that is an ingredient,
you will need the template code provided.

Good luck

Chems

unread,
Aug 27, 2019, 3:35:50 PM8/27/19
to TiddlyWiki
Thanks Mark.

<<list-links "[has[ingrediant]ingrediant<currentTiddler>]">>

appears to be exactly what I want, but it is not working for me. 
Is shows an empty list; unfortunatly nothing more.

You know why its like this?
Message has been deleted

Mark S.

unread,
Aug 27, 2019, 4:23:53 PM8/27/19
to TiddlyWiki
If your current tiddler is "Apple", then it will list all tiddlers that have the ingredient (ingrediant) "Apple".

If you are in some other tiddler, that is not an ingredient, then nothing will list.

TonyM

unread,
Aug 27, 2019, 6:11:30 PM8/27/19
to TiddlyWiki
Chems

Wrapp your list-links macro call in a list widget that iterates each of the tiddlers you want the list links macro to act on.

Personaly list links macro is limited and I mostly use the list widget now.

Sometimes you can write a single filter that does it all but nesting lists can be forced on by the nature of the data. List widgets permit this nesting.

Regards
Tony

Anjar

unread,
Aug 27, 2019, 6:31:25 PM8/27/19
to TiddlyWiki
Hi Chems,

The easiest is often an example: http://folk.ntnu.no/anderhja/list-link-example.html
Demonstrating Mark's solution, and also a nested list


Best,
Anders

Chems

unread,
Aug 29, 2019, 9:20:50 AM8/29/19
to TiddlyWiki
Thank you very much! That helped a lot.

<3
Reply all
Reply to author
Forward
0 new messages