to double-bracket or not to double-bracket...

100 views
Skip to first unread message

springer

unread,
Jun 17, 2020, 9:00:43 PM6/17/20
to tiddl...@googlegroups.com
Dear all,

I've become a real fan of dynamic tables; almost every tiddler for a person or a kind now includes a table that neatly shows a row for each tiddler tagged as such (or otherwise referencing it in a field, whatever I need) -- with toggle to display the related contents right there below the row. Hooray Mohammad!

Here's a quandary that I'm guessing pros would not run into: 

When filling the "talk-to" field, I'm tempted to enter [[ZName]] (with the double-brackets) so that the dynamic tables will display, in the talk-to column, a link to the ZName tiddler.

But then I'd like the ZName tiddler to have a dynamic table that can show (say) all tiddlers with [[ZName]] in the talk-to field. But of course the brackets don't behave well with the filter syntax, and simple escaping doesn't seem to work.

What am I missing?

It so happens that one workaround would be easy in my use-case if I could just get TW to treat TThis as CamelCase, because then I'd get the link behavior without the double-brackets, right? (The reason all my names are like ZName is because my institution's email addresses all take FLast form, so it's the most helpful brief way of individuating people.) But others may be interested in the general question of how to put tiddler names into fields (so as to enable links in dynamic tables), so I ask here.

Also, the more publicity for dynamic tables, the better!

-Springer

PMario

unread,
Jun 18, 2020, 4:58:15 AM6/18/20
to TiddlyWiki
Hi,

If you use ZName without the brackets, you can use <$link to=...> in your table template. So it will show a link in the table, but you can use the "pure" format in the field.

just an idea.

have fun!
mario

springer

unread,
Jun 18, 2020, 11:05:52 AM6/18/20
to TiddlyWiki
Hi Mario, thanks for offering an idea...

In shiraz' dynamic tables macro, I can specify a set of columns like so

fields: "title caption talk-to notes created modified"

If I try to insert a
<$link to=talk-to>

in that string of fields (or any variation I can think of on that theme), the macro reads
<$link

as a field, and
to=...>

as another field (and I see empty columns for each of those headings, of course).

Did I misunderstand what you were suggesting?

A *different* strategy might be this: Since TiddlyWiki already has a toggle to treat tiddler titles as links, I wonder whether that can mechanism can be hacked to specify other fields that we can render always as links...? (That could be exciting!)

-Springer

Mark S.

unread,
Jun 18, 2020, 12:35:52 PM6/18/20
to TiddlyWiki
Dynamic tables has the ability to add templates for columns.

You could take the column template for email, clone it, change "email" to "talk-to", modify the <a> link to use the <$link...> syntax instead. There's a little extra involved since you'll need to fetch the value of currentRecord!!currentField. This assumes that the contents of "talk-to" always point to a tiddler, of course.
Reply all
Reply to author
Forward
0 new messages