tagGrid for TiddlyWiki 5

256 views
Skip to first unread message

stevesuny

unread,
Oct 25, 2016, 3:32:42 PM10/25/16
to TiddlyWiki
Hi, about 8 years ago, Eric Shulman posted tagGrid plugin (http://www.tiddlytools.com/#TagGridPlugin) for TWClassic which generated a nice cross-reference table showing the intersection of two tags. Was wondering if anyone has similar plugin or logic for TiddlyWiki 5? Thanks! //steve.

Tobias Beer

unread,
Oct 25, 2016, 3:43:10 PM10/25/16
to TiddlyWiki
It's not a grid, but it's grouping tids into cross-lists:


Best wishes,

Tobias.

Jed Carty

unread,
Oct 26, 2016, 4:48:07 AM10/26/16
to TiddlyWiki
You could make something like that using some nested list widgets. TW5 makes a lot of things much easier.

I will put this in a macro in a bit, but for now this works. It doesn't have any of the nice ui things that Eric made but it gives a grid. You can just paste it into tiddlywiki.com to see what it does.


<$set name=OuterTagList filter='[all[]tags[]limit[10]]'>
<$set name=InnerTagList filter='[all[]tags[]limit[10]]'>
<table>
<tr>
<td></td>
<$list filter=<
<InnerTagList>>>
<td><<currentTiddler>></td>
</$list>
</tr>
<$list filter=<
<OuterTagList>> variable=OuterTag>
<tr>
<td>
<
<OuterTag>>
</td>
<$list filter=<
<InnerTagList>> variable=InnerTag>
<td><$count filter='[tag<OuterTag>tag<InnerTag>]'/></td>
</$list>
</tr>
</$list>
</table>
</$set>


Jed Carty

unread,
Oct 26, 2016, 6:17:02 AM10/26/16
to TiddlyWiki
I made a macro for it here: http://ooktech.com/jed/ExampleWikis/TagGrid/

You can make each cell do whatever you want by giving it a template. At the moment each cell only displays the number of tiddlers, it doesn't show a list of them like in Erics version. I will probably make that in a few minutes.

Tobias Beer

unread,
Oct 26, 2016, 7:13:11 AM10/26/16
to TiddlyWiki
Hi Jed,

Funny how your example is suffering from the exact same problem as here:

allows to specify state qualifier for tag popups

Hint: Try clicking one of your tagpills. ;-)

Best wishes,

Tobias.

Jed Carty

unread,
Oct 26, 2016, 7:23:11 AM10/26/16
to TiddlyWiki
Yes, I talk about that in the documentation there, it is why the tag pills aren't on by default. I am almost finished with an alternative that doesn't have the same problem.

stevesuny

unread,
Oct 26, 2016, 1:24:22 PM10/26/16
to TiddlyWiki
Jed, this is great, thanks so much.

I'm having trouble with the cells, though.

Here is what I would expect:

(1) Create a tiddler called TagGridCells
(2) Set text of TagGridCells to {{!!title}}<br>
(3) Call the macro like this:

<<TagGrid RowFilter:"[tag[Colors]]" ColmunFilter:"[tag[Cars]]" cells:"TagGridCells">

(4) Expect to see the title of each tiddler in the grid cells presented, with <br> between them.

Here's what I get:

https://stevesunypoly.updog.co/designwrite/experimental/2tab.html

(and, I also demo here my own macro, with none of the sophistication that yours has, or any of the options, but just to illustrate what I am hoping to see).

Thanks again,

//steve.

Jed Carty

unread,
Oct 26, 2016, 2:05:20 PM10/26/16
to TiddlyWiki
You can make a template to do what you want to do, but there isn't a way to directly do what you have using what I made. Each cell has two parameters (two tags), so there isn't any useful value to set the currentTiddler variable to. What each cell has is the variable ColumnTag and RowTag (note that i just updated the names, they were InnerTag and OuterTag until about 5 minutes ago) which are the name of the tag used to make the current column and row respectively.

So to make what you described you would put this in your template tiddler:

<$list filter='[tag
<RowTag>tag<ColumnTag>]'>
<$view field='title'/>
<br>
</$list>


Steven Schneider

unread,
Oct 26, 2016, 3:25:40 PM10/26/16
to TiddlyWiki
Hey Jed, again, thanks for this. It (will be) wonderful.

But:

As illustrated at https://stevesunypoly.updog.co/designwrite/testing/tagGrid-testing.html
something is wrong with the ColumnTags -- they are "stuck" on something and not being called. Perhaps when writing a $:/ type tiddler? Something's amiss, but beyond my abilities to figure it out. I can test...

More generally: What I see you've accomplished here is the ability to use a template to format a cell, with all the flexibility and power of writing a tiddler. This is very powerful...

Again, thanks.

//steve.

Jed Carty

unread,
Oct 26, 2016, 4:04:01 PM10/26/16
to TiddlyWiki
In your second table you spelled column wrong.

stevesuny

unread,
Oct 27, 2016, 2:25:56 PM10/27/16
to TiddlyWiki
oh my. you are right! thanks...i stared at that for far too long, and didn't notice. 
Reply all
Reply to author
Forward
0 new messages