How can I list all backlist (no matter the "type")?

76 views
Skip to first unread message

Tony K

unread,
Apr 28, 2020, 5:38:11 PM4/28/20
to TiddlyWiki
I will try to explain :)

I can refer to a Tiddler in one of 3 ways
1. a Tag
2. a [[Hard Link]] *don't know if that what it is called*
3. a "Keyword" I use the keywords field in the tiddler

how can I list all backlinks to a specific Tiddler no matter which type of the above 3 is linking to it?

thank you 

Mat

unread,
Apr 28, 2020, 6:14:45 PM4/28/20
to TiddlyWiki
You'll need to do it for all three "individually". But I'm not aware of a native field called "Keyword" so I'm guessing this is your own custom field. Regardless:

{{{ [tag[mytag]] [backlinks[hardlink]] [keyword[mykeyword]] }}}

<:-)

P.S I made SearchWords which may be of use.

Tony K

unread,
Apr 28, 2020, 6:29:26 PM4/28/20
to TiddlyWiki
Mat may i bother you with one more question because it is way passed my bedtime and i want to sleep :D

from my testing 

<$list filter="[is[current]!field:reference[]]">
<div class="sl-header">
''Ref'': <a href={{!!url}}><$view field="reference"}}/></a><br>
''Keywords'': <$list filter={{!!keywords}} template="$:/ak/ui/KeywordsTemplate" />
</div>
</$list>
This will execute what is inside the <$filter></$filter> if the field "reference" is empty or not present

how do i add an "else" to this ? if it is present i want to execute another code..

Mat

unread,
Apr 28, 2020, 6:49:50 PM4/28/20
to TiddlyWiki
I'm afraid I'm too tired also. "Else" is a rather new operator so I'm not yet fully familiar with it so I'm the wrong person to answer at least when in this state of mind.

<:-)

Tony K

unread,
Apr 28, 2020, 7:02:55 PM4/28/20
to TiddlyWiki
no worries I just got to make it work
I don't understand the logic but it works lol so I can hit the bed I guess

thanks a million for your help

Tony K

unread,
Apr 29, 2020, 8:44:44 AM4/29/20
to TiddlyWiki
I am still struggeling with this one 

so if anyone has any idea :D

Mark S.

unread,
Apr 29, 2020, 8:59:06 AM4/29/20
to TiddlyWiki
The 'emptyMessage' attribute is usually used for alternate outcomes. If the alternate will have a lot of code, then sometimes it is better to put in a macro. e.g. emptyMessage=<<mycode>>

Since you're doing a simple state check, you could possibly also use two sets of reveal widgets.

Mat

unread,
Apr 29, 2020, 9:03:08 AM4/29/20
to TiddlyWiki
how do i add an "else" to this ? if it is present i want to execute another code..

OK, given the code you provide I'd say you should not use an "else operator" if that is at all what you meant. Instead you'd simply make another listwidget but negate the filter, i.e without the exclamation mark before the field operator, and with whatever other content you want to show.

<:-)


Reply all
Reply to author
Forward
0 new messages