What’s the objective? 

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.
My solution 

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>

Problem 1 

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>]">>

Problem 2 

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.
Request 

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.
​

-- 
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/29de45ed-cdeb-466d-95ad-67fc03878c53o%40googlegroups.com.

Reply via email to