I've been tinkering with this approach and it fills the need pretty well. I 
hadn't really thought of using title lists in fields before, so using that 
+ the list macro + transclusion has helped a great deal. 

The only thing that has felt a little awkward has been having to create 
strings of tiddlers connected by fields to model some of the more 
sophisticated relationships.

Thanks for the pointers!

On Monday, February 3, 2020 at 7:20:31 PM UTC-6, Eric Shulman wrote:
>
> On Monday, February 3, 2020 at 4:03:51 PM UTC-8, Michael McDermott wrote:
>>
>> Is there a way to semantically model some relationship between two 
>> tiddlers?
>> For example, in a graph database, you might create a relationship like 
>> this:
>> [Leonardo da Vinci]   ----Painted--->    [The Mona Lisa]
>> Is there a good option in TiddlyWiki I've missed?
>>
>
> You can create any "custom" fields you like on a tiddler.
>
> To represent a one-to-one relationship between painting and painter, you 
> could define
> a "paintedby" field for a painting, the value of which would be the title 
> of a "painter" tiddler.
>
> e.g., [[The Mona Lisa]] tiddler would have a "paintedby" field containing: 
> "Leonardo Da Vinci".
>
> Conversely, to represent one-to-many relationships, you could define a 
> "painted" tiddler for
> an artist, the value of which would be a space-separated list of titles of 
> paintings.
>
> e.g., [[Leonardo Da Vinci]] tiddler would have a "painted" field 
> containing: [[The Mona Lisa]] [[The Last Supper]] [[Salvator Mundi]]
>
> Then, to display a list of all his works, you can write in the [[Leonardo 
> Da Vinci]] tiddler:
> <$list filter="[list[!!painted]]"><$link /><br></$list>
>
> Alternatively, if not all paintings by Da Vinci are entered into the 
> "painted' field, you can still list all his paintings using a filter that 
> looks for his name in the "paintedby" field of other tiddlers, like this:
> <$list filter="[all[tiddlers]paintedby<currentTiddler>]">...</$list>
>
> For a more complex example, let's suppose that each artist tiddler is 
> tagged with "artist".  Then, you could create a list of all paintings in 
> the document, grouped by artists, using something like:
> <$list filter="[tag[artist]]">
>    <$link />
>    <blockquote>
>       <$list filter="[all[tiddlers]paintedby<currentTiddler>]"><$link />
> <br></$list>
>    </blockquote>
> </$list>
> The outer $list finds all artist tiddlers and displays their titles, while 
> the inner $list shows all the tiddlers for the current artist (inside a 
> blockquote for nicer formatting
>
> enjoy,
> -e
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/57e2a0a7-8af7-4995-9a74-20a833f8b526%40googlegroups.com.

Reply via email to