Relink, and setting up button widgets for modals

120 views
Skip to first unread message

CJ Veniot

unread,
Mar 15, 2020, 10:46:55 PM3/15/20
to TiddlyWiki
G'day all,

Just in case there are other newbies like me who ever run into this ...

I am a huge fan of the Relink plug-in, and ran into this wee issue today learning how to use modals in TW.

The following in one of my tiddlers pops up a modal displaying the "Under Construction" tiddler:

<$button message="tm-modal" param="Under Construction">This site is a work in progress</$button>

The problem I ran into:  Changing the name of the tiddler "Under Construction" to something else, Relink doesn't change the param above, which makes sense because that would really (in my mind, anyway) make Relink way more complicated than necessary.  (i.e. I think it would be a bad idea to change Relink to handle Tiddler name changes in any "param".)

So easy to handle the problem above with the following easy change to the button widget, which works A-1 with Relink:

<$button message="tm-modal" param={{Under Construction!!title}}>This site is a work in progress</$button>

Relink can find that {{UnderConstruction!!title}} no problem, and change that as per however the tiddler name gets altered.

Nothing particularly earth-chattering, but I've got to find ways to contribute somehow ...

Cheers !

CJ Veniot

unread,
Mar 15, 2020, 11:36:33 PM3/15/20
to TiddlyWiki
I had forgotten, I was having the same pain-in-the-caboose issue with Tidgraph.

So instead of:  <$tidgraph start="Mapping Approaches" layout="S" maxdepth="1" startat="1"/>

I am now doing this:  <$tidgraph start={{Mapping Approaches!!title}} layout="S" maxdepth="1" startat="1"/>

Me still being the TiddlyWiki newbie, I'm sure there are all kinds of other situations (I haven't run into yet), in which a tiddler name is a parameter enclosed in double-quotes.  I'm thinking all of these situations need changing to {{tiddler-name!!title}} so that Relink works with anything/everything.

Of course, Relink is oh-so-important to me because I am a tweaker, always starting with tiddler names that I know aren't quite right, but are good enough for the moment until I iteratively and incrementally get that perfect tiddler name ... 

TonyM

unread,
Mar 16, 2020, 12:24:50 AM3/16/20
to TiddlyWiki
CJ

Thanks for sharing. Despite being a long time user of TiddlyWiki the relink plugin is new and your tip is one worth keeping.

Every little contribution helps.

Regards
Tony

A Gloom

unread,
Mar 16, 2020, 1:16:37 AM3/16/20
to TiddlyWiki

So easy to handle the problem above with the following easy change to the button widget, which works A-1 with Relink:

<$button message="tm-modal" param={{Under Construction!!title}}>This site is a work in progress</$button>

Relink can find that {{UnderConstruction!!title}} no problem, and change that as per however the tiddler name gets altered.

Nothing particularly earth-chattering, but I've got to find ways to contribute somehow ...

Actually I see an application here-- to change-proof macros and widgets from later tiddler title changes {{tiddlertitle!!orgname}}

orgname field would be set on tiddler creation using original title so if you hate having to go find a tiddler tilte that is being changed in every widget throughout a wiki-- the orgname field wouldn't change with title edits

A Gloom

unread,
Mar 16, 2020, 1:47:40 AM3/16/20
to tiddl...@googlegroups.com
>< actually that won't work-- the tidller titile change would make the tiddlertitle portion of the transclusion invalid-- back to the drawing board after I get another dozen cups of coffee first

>> but I've got to find ways to contribute somehow ...

understood-- here too-- I've resorted to lunacy to contribute >> <<

CJ Veniot

unread,
Mar 16, 2020, 11:22:09 AM3/16/20
to TiddlyWiki
Lunacy?  Well, then: I'm your Huckleberry.  ("Tombstone" reference I use at every opportunity!)

CJ Veniot

unread,
Mar 16, 2020, 11:33:23 AM3/16/20
to TiddlyWiki
To me, {{tiddlertitle!!title}} is doing the trick everywhere.

But I am always out to learn new tricks.  So now I want to navigate the recesses of your sponge to see what neat little things I can add to my own sponge.

Is "orgname" = "original title"?  Not much use to me, I think, because I change tiddler titles repeatedly, without caring about the original title or the transitions between original title and current title.

If I did need it, though, the full list of all titles in the history of a tiddler would be nice, but I'd probably track that on my own in some sort of change log.

And now I'm thinking:  as often as I wind up tweaking tiddler titles, I'd also be tweaking orgnames too.  So double-tweaking?  More of a mess because I'm forever fiddling with titles and orgnames?

Anyway, all of that paralysis by analysis aside, what problem would orgname solve for you?  Dollars to donuts, I've probably got the same problem and I don't yet know it...

A Gloom

unread,
Mar 24, 2020, 3:09:23 AM3/24/20
to TiddlyWiki
my apologies CJ, got sidetracked-- ooh, a snippet of code... navigate the recesses of your sponge to see what neat little things I can add to my own sponge.

Is "orgname" = "original title"?  Not much use to me, I think, because I change tiddler titles repeatedly, without caring about the original title or the transitions between original title and current title.

If I did need it, though, the full list of all titles in the history of a tiddler would be nice, but I'd probably track that on my own in some sort of change log.

And now I'm thinking:  as often as I wind up tweaking tiddler titles, I'd also be tweaking orgnames too.  So double-tweaking?  More of a mess because I'm forever fiddling with titles and orgnames?

Anyway, all of that paralysis by analysis aside, what problem would orgname solve for you?  Dollars to donuts, I've probably got the same problem and I don't yet know it...

my original idea was to have a changelog field with automatic redirect for any code snippets through the wiki, but I was using tiddler title which when changed would break the reference to the title being used in code snippets -- orgname = original name

the idea was because-- for me-- i often have tiddler titles in filters and wikitext elements (tabs, select, checkbox, etc) that I have to do a manual text field search for  to edit whenever I change a tittler title

but having a field for MANUAL recording of title changes is the best I have at the moment because to have it automatic would require enlist operation I believe to tack on additonal title changes without overwriting previous changes

TonyM

unread,
Mar 24, 2020, 5:49:45 AM3/24/20
to TiddlyWiki
On renaming tiddlers

Relink is a marvelous tool, however Personaly I do not have a problem renaming tiddlers because of a standard naming practice. I am always careful to separate code with fixed names and data free to rename. Truth is I bring decades of coding experience to this but I wish I could mind meld with few of you to pass it on.

Not withstanding this I have forseen issues in some very specific cases and already have solutions. The most powerful with lots of additional benefits is. TSN tiddler serial number which is set once and never changes so when you want a permanent rename open link you can have it.

Nor would it be hard to provide a whole suit related tools, already we could make use of the TSN , alias plugin and Relink not only to free tiddler names but open up some really cool features.

Regards
Tony

Flibbles

unread,
May 26, 2020, 10:59:17 AM5/26/20
to TiddlyWiki
I'm going back and addressing all discussions about Relink.

<$Button param /> is something Relink won't handle by default, because param could be anything, not just a title. However, if you only ever use it as a title, you can add <$button param> to the Relink whitelist as a title, and then Relink will handle it. If not, {{MyTiddler!!title}} works in most cases.

@CJ Veniot: I don't know what <$tidgraph/> is, but you can add <$tidgraph start> to your whitelist, and Relink will handle it for you without the transclusion trick.
Reply all
Reply to author
Forward
0 new messages