The quickest solution would be to use your own template, a modified version
of the $:/core/ui/TagTemplate
This is untested code and not the most elegant, but something like this
should work:
<table>
> <$list filter="[all[current]backlinks[]]">
> <$set name="_currentTiddler" value=<<currentTiddler>> >
> <tr>
> <td>
> <$link>{{!!title}}</$link>
> </td>
> <td class="tc-tags-wrapper">
> <$list filter="[all[current]tags[]]" template="$:/myTagTemplate"/>
> </td>
> </tr>
> </$set>
> </$list>
> </table>
where the template looks like this (note the second line of the template
that cobbles together a state tiddler title):
\whitespace trim
> \define tagPopupState()
> $:/state/popup/tag/$(storyTiddler)$/$(_currentTiddler)$/$(currentTiddler)$
> <span class="tc-tag-list-item">
> <$set name="transclusion" value=<<currentTiddler>>>
> <$macrocall $name="tag-pill-body" tag=<<currentTiddler>> icon={{!!icon}}
> colour={{!!color}} palette={{$:/palette}} element-tag="""$button"""
> element-attributes="""popup=<<tagPopupState>>
> dragFilter='[all[current]tagging[]]' tag='span'"""/>
> <$reveal state=<<tagPopupState>> type="popup" position="below"
> animate="yes" class="tc-drop-down">
> <$set name="tv-show-missing-links" value="yes">
> <$transclude tiddler="$:/core/ui/ListItemTemplate"/>
> </$set>
> <$list
> filter="[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]"
> variable="listItem">
> <$transclude tiddler=<<listItem>>/>
> </$list>
> <hr>
> <$macrocall $name="list-tagged-draggable" tag=<<currentTiddler>>/>
> </$reveal>
> </$set>
> </span>
On Tuesday, March 17, 2020 at 12:38:06 PM UTC+1, Soren Bjornstad wrote:
>
> Thanks everyone for all your help so far!
>
> The tiddler Mohammad linked isn't really what I want to do. I want nested
> lists where each backlink to the current tiddler is a row, and one of the
> columns of each row shows the tags of the backlinked tiddlers -- not a
> multi-column listing of one set of tags. So a responsive, multi-column
> table doesn't help much here.
>
> I did try using the <$transclude /> widget as described in that reference,
> but this didn't work either. I also tried putting each entry in a separate
> div in case this caused selectors to work differently:
>
> <$list filter="[all[current]backlinks[]]">
> <div>
> {{!!title}}
> <$list filter="[all[current]tags[]]">
> <$transclude tiddler="$:/core/ui/TagTemplate"/>
> </$list>
> </div>
> </$list>
>
>
> I think A Gloom is on to something -- $:/core/ui/TagTemplate appears to
> have a state tiddler hard-coded into it:
>
> <$reveal state=<<qualify "$:/state/popup/tag">> type="popup"
> position="below" animate="yes" class="tc-drop-down">
>
> My question remains, is there some way to get around this? Worst case I
> could handle having the tags be non-clickable (and I don't know how to do
> that either off the top of my head), but the drop-downs are pretty nice.
>
> Incidentally, I am on TiddlyWiki 5.1.21 running through TiddlyServer.
>
>
> On Tuesday, March 17, 2020 at 5:20:41 AM UTC-5, Mohammad wrote:
>>
>> Have a look here
>>
>> https://tiddlywiki.com/prerelease/#Formatting%20List%20Results%20as%20Tables%20with%20CSS%20-%20Variable%20Column%20Method
>>
>> --Mohammad
>>
>> On Tuesday, March 17, 2020 at 2:33:18 AM UTC+3:30, Soren Bjornstad wrote:
>>>
>>> Hi everyone,
>>>
>>> I am trying to make a simple table that lists tiddlers matching a
>>> filter, along with those tiddlers' tags (in the standard pill display).
>>> I've written the following template tiddler:
>>>
>>> <table>
>>> <$list
>>> filter="[all[current]backlinks[]!tag[Source]!tag[Publication]!tag[Place]!tag[Meta]!tag[PAO]]">
>>> <tr>
>>> <td>
>>> <$link>{{!!title}}</$link>
>>> </td>
>>> <td class="tc-tags-wrapper">
>>> <$list filter="[all[current]tags[]]"
>>> template="$:/core/ui/TagTemplate"/>
>>> </td>
>>> </tr>
>>> </$list>
>>> </table>
>>>
>>> This renders nicely enough when I transclude it. However, when the same
>>> tag appears multiple times in a list and I click on that tag pill, every
>>> pill's menu opens, creating an unusable mess:
>>>
>>> [image: shot.png]
>>>
>>> How can I make only the pill I click on open? From my limited knowledge
>>> of web programming, I am guessing this is happening because the pills don't
>>> have unique identifiers, but I have no idea how to go about fixing this in
>>> my template.
>>>
>>
--
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/b813b7a9-3833-42da-947e-43159b52ac1d%40googlegroups.com.