How can list tag pills of the current tiddler in a table of filtered tiddlers?

314 views
Skip to first unread message

Rene

unread,
Apr 26, 2018, 10:12:01 AM4/26/18
to TiddlyWiki
I have a filtered list of tiddlers with author and quote field, formatted as a table. In one column i would like to show the tag pills of the corresponding tiddler.
How can i do this?

Rene

unread,
Apr 26, 2018, 10:15:16 AM4/26/18
to TiddlyWiki
<table>
<tr>
<th>author</th>
<th>quote</th>
<th>tags</th>
</tr>
<$list filter="[tag[quote]sort[author]]">
<td><$view field="author"/></td>
<td><$view field="quote"/></td>
<td> ??? </td>
</tr>
</$list>
</table>

Mark S.

unread,
Apr 26, 2018, 10:49:37 AM4/26/18
to TiddlyWiki
Try:

<table>
<tr>
<th>author</th>
<th>quote</th>
<th>tags</th>
</tr>
<$list filter="[tag[quote]sort[author]]">
<tr>

<td><$view field="author"/></td>
<td><$view field="quote"/></td>
<td>

<$list filter="[all[current]tags[]!title[quote]]" template="$:/core/ui/TagTemplate"/>
</td>
</tr>
</$list>
</table>

HTH
-- Mark

Rene

unread,
Apr 30, 2018, 8:16:54 AM4/30/18
to TiddlyWiki
Thanks Mark. Unfortunately nothing shows up in the table cell. Any ideas?

TonyM

unread,
Apr 30, 2018, 9:42:42 AM4/30/18
to TiddlyWiki
Rene,

{{||$:/core/ui/TagTemplate}} will show a tag pill of the currentTiddler which changes inside list widgets if you do not use variable=variablename.

Or do you mean something else?
Tony

Mark S.

unread,
Apr 30, 2018, 9:50:20 AM4/30/18
to TiddlyWiki
Without seeing your data, it's hard to know. Did you use the *exact* text provided previously?

You might experiment with removing "!tag[quote]" That bit was in their so you wouldn't see the redundant "quote" tag, but if that is the only tag, then there will be no tags.

-- Mark

Birthe C

unread,
Apr 30, 2018, 9:58:00 AM4/30/18
to TiddlyWiki
Hi Rene

<table>
<tr>
<th>author</th>
<th>quote</th>
<th>tags</th>
</tr>
<$list filter="[tag[quote]sort[author]]">
<tr>
<td><$view field="author"/></td>
<td><$view field="quote"/></td>
<td>

<$list filter="[tag[quote]tags[]]-[[quote]]">
<$transclude tiddler="$:/core/ui/TagTemplate"/>
</$list>
</td>
</tr>
</$list>
</table>


Birthe

Rene

unread,
Apr 30, 2018, 12:19:07 PM4/30/18
to TiddlyWiki
Yeah, removing "!tag[quote]" makes it work now. Unfortunately by clicking on one pill, all pills with the same text open at once. That is a pretty mess, but seems to be the way these pills work. Is there another solution when clicking on a tag, that the entries for that tag show up once?

Rene

unread,
Apr 30, 2018, 12:21:43 PM4/30/18
to TiddlyWiki
Thanks Birthe! Your solutions shows all possible tags for every tiddler, not only the assigned ones. This behaviour was not intended.

Rene

unread,
Apr 30, 2018, 12:24:08 PM4/30/18
to TiddlyWiki
Sorry Tony, i did not understand your posting ("variable=variablename), because i am Tiddlywiki-Rookie. Thanks anyway.

Mark S.

unread,
Apr 30, 2018, 12:42:58 PM4/30/18
to TiddlyWiki
When you click on a pill, all tiddlers that are tagged with that tag should appear. If you think something else is happening, perhaps you could post a screenshot.

-- Mark

TonyM

unread,
Apr 30, 2018, 9:02:38 PM4/30/18
to TiddlyWiki
Rene,

I suppose you only need to know if you did this it would not work, so dont do it.

However the $list widget allows you to set a variable name in which case {{||$:/core/ui/TagTemplate}}  needs to be done differently.

On the pill dropdown, you can select individual tiddlers to open, click on the title, I am not sure why you are getting them all.

Regards
Tony

Birthe C

unread,
May 1, 2018, 3:40:41 AM5/1/18
to TiddlyWiki
Several tiddlers can have the same tags. The table showing each tiddler in a new row and then clicking the tagpill will open several tagpills on top of each other.
i think that is the problem.

Birthe

Rene

unread,
May 3, 2018, 4:20:49 AM5/3/18
to TiddlyWiki

Exactly! See here:

S. S.

unread,
Jul 5, 2018, 10:17:50 AM7/5/18
to tiddl...@googlegroups.com
Moved to the bottom of the thread

S. S.

unread,
Jul 5, 2018, 10:19:53 AM7/5/18
to TiddlyWiki


On Monday, April 30, 2018 at 11:19:07 PM UTC+7, Rene wrote:
Yeah, removing "!tag[quote]" makes it work now. Unfortunately by clicking on one pill, all pills with the same text open at once. That is a pretty mess, but seems to be the way these pills work. Is there another solution when clicking on a tag, that the entries for that tag show up once?



Rene, 

Try doing it this way:

Make a tiddler, call it, say: Table of Quotes

<table>
<tr>
<th>author</th>
<th>quote</th>
<th>tags</th>
</tr>

<$list filter="[tag[quote]sort[author]]" template="
Table of Quotes template">
</$list>
</table>

Notice that the outer list calls a display template for the inner list.

Make another tiddler, call it: Table of Quotes template

<tr>
<td><$view field="author"/></td>
<td><$view field="quote"/></td>
<td>
<$list filter="[all[current]tags[]!title[quote]]" template="$:/core/ui/TagTemplate"/>
</td>
</tr>

I have no idea WHY it works, but this is how I solved a similar issue of - clicking on one tag pill opens the dropdown menu of all the other tag pills with the same name.

Reply all
Reply to author
Forward
0 new messages