Show a list of tiddlers that link to the current tiddler, using either soft or hard links, and show the tiddlers current tiddler links to.
Create a template with the following code
<div class="tiddler-related-links">
<div class="backlinks">
! What Links here
<<list-links "[<currentTiddler>backlinks[]]" emptyMessage:"None" class:"tiddler-related-links-list" type:"ol">>
</div>
<div class="outbound">
! Outbound links
<<list-links "[<currentTiddler>links[]]" emptyMessage:"None" class:"tiddler-related-links-list" type:"ol">>
</div>
<div class="outbound">
! Search Result
<<list-links "[!is[system]!is[current]search:text:literal<currentTiddler>]">>
</div>
</div>
I could not find an operator that lists soft-links. So I relied on the search operator. What do you think of the following code?
<<list-links "[!is[system]!is[current]search:text:literal<currentTiddler>]">>
I could not figure out how to show the soft-links used in the current tiddler. I guess that I would have to use regex and search operators.
I am not sure what the perfect regex expression would be because you can create a soft-link in a number of ways, like using """
or using {{
. Also, how to know that the text inside """
or {{
is part of a soft-link.
Kindly review my code and let me know if I missed something or if it can be improved.
Also, please share a solution if you know a way to solve problem 2 reliably.