adding whitespace separating results from a $list filter run

61 views
Skip to first unread message

Gavin Gamboa

unread,
Feb 6, 2021, 2:29:32 AM2/6/21
to TiddlyWiki
I spent some time trying to figure this out. I am trying to format a series of tag with the same parent tag 'author name' that get returned by this list widget:

<ul>
   <$list filter="[tag[Bookcase]!<currentTiddler>!sort[sortdate]]">
      <li>
         <$link><$view field="title"/></$link><br>
<$list filter="[all[current]tags[]tag[author name]]"/> ~ <$view field="date"/>//^^
      </li>
  </$list>
</ul>

but no matter what I have tried, if there are multiple tags with parent tag 'author name' (i.e. if a book as several authors or editors) in <currentTiddler> the returned tags run into each other without a whitespace, making it very unreadable. I think I need to specify a custom template, but I am a bit lost when it comes to that, and my energy feels spent trying to figure this out.

Any help appreciated,

Eric Shulman

unread,
Feb 6, 2021, 2:38:18 AM2/6/21
to TiddlyWiki
On Friday, February 5, 2021 at 11:29:32 PM UTC-8 gavin....@gmail.com wrote:
<$list filter="[all[current]tags[]tag[author name]]"/>
...the returned tags run into each other without a whitespace

By ending with "/>", you are using the short form of the $list widget.
Instead, you should use the full syntax which will allow you to specify the desired output content including whitespace, like this:

<$list filter="[all[current]tags[]tag[author name]]"><$link/>&nbsp;</$list>

enjoy,
-e

Mat

unread,
Feb 6, 2021, 6:22:06 AM2/6/21
to TiddlyWiki
you could apply this style

.commalist .tc-tiddlylink.tc-tiddlylink-resolves:not(:last-child):after {content:", ";}

An extension of that is the follwing "list-links-inline" macro

http://list-links-inline.tiddlyspot.com/ 

<:-)



Gavin Gamboa

unread,
Feb 6, 2021, 12:07:43 PM2/6/21
to TiddlyWiki
Thank you @Eric Shulman. I don't know where I would have found that in the docs. Much appreciated
Reply all
Reply to author
Forward
0 new messages