Text to precede $:/tags/ViewTemplate

I now have my backlinks showing as I want with the use of the $:/tags/ViewTemplate tag, based on Links from Fields and Backlinks

Supplementary question:

How can I include some text to precede the actual link(s), but to only appear when there is a valid link, so that it looks something like this:

Links to this Tiddler:
Tiddler1
Tiddler2

This is the code in my “backlinks” tiddler:

<$list filter=’[all[tiddlers]Property<currentTiddler>]’>

</$list>

There is a syntax error in this and thus also insufficient info to answer your question. However lets assume you have a working filter that returns zero more than one result.

<$list filter="yourfilter +[limit[1]]" variable=~>
   <$list filter="yourfilter">

   </$list>
</$list>
  • The inner list will only be “rendered” if your filter finds one or more items satisfying your filter. It will only render once due to the +[limit[1]], butr within that list as many as exist.

I’ve fixed the original post (it needed a “<” escaping), and my final working code in the backlinks tiddler is:

<$list filter="[all[tiddlers]Property<currentTiddler>] +[limit[1]]" variable=~>Some text to precede the links:
<$list filter="[all[tiddlers]Property<currentTiddler>]">

</$list>
</$list>

Thanks for the help.

3 Likes