@Joshua Thank you! I think I will use that method. Things like backlinks
will be awkward, but do-able as per my previous post. Another issue would
be if you wanted to display different text (as in[[Tiddler title|Display
string]]). The best I can think of is to use something like ! as a
delimiter, and use the following template:
<$vars tiddler={{{ [<currentTiddler>split[!]first[]] }}} caption={{{
[<currentTiddler>split[!]last[]] }}}>
<$link to=<<tiddler>>> <<caption>> </$link>
</$vars>
Then you could use the syntax {{Alice!Display string||relationship-type}}.
@Soren Having said all that, I would love to see something like this either
as a plugin or included in the core. Maybe it would be worth making a
feature request on GitHub in case there is someone out there who would like
to add it, and also has the technical knowledge to do so? What do you think?
On Saturday, 27 February 2021 at 19:32:13 UTC Soren Bjornstad wrote:
> Occasionally I find myself wishing I could include additional information
> with a link, often describing the exact relationship expressed by the link.
> A basic example would be, in a journal tiddler, I might link to a person
> and want to keep track of whether the person actually *participated* in
> the events being described, or was just *mentioned *in them.
>
> I imagine a syntax something like this:
>
> Mentioning [[Alice!mention]].
> Or [[a person|Alice!mention]].
>
> Another sensible choice could be to expose this functionality only through
> the <$link> widget, so that no new syntax would need to be introduced.
>
> You would then be able to filter on this metadata through a suffix of the
> links[] or backlinks[] operator, e.g., the filter
> "[[Alice]backlinks:mention[]]" could return only those links to Alice that
> are of the *mention* type. Perhaps something like
> "[linktype[LinkingTiddler],[Alice]]" to retrieve the type value as well
> (could have multiple values if there are multiple links of different types).
>
> I don't think there is anything you would be able to do with this that you
> can't do with fields, but I think in quite a few cases this would be a more
> convenient syntax. Another advantage in some cases is that the metadata
> would automatically come along with excisions and copy-paste.
>
> Does this sound interesting to anyone else? Practical?
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/36027962-11da-4a96-b220-c9217a1e70acn%40googlegroups.com.