A HOWTO: My approach to modals now involves a transclusion template

185 views
Skip to first unread message

Charlie Veniot

unread,
Oct 9, 2020, 10:16:29 PM10/9/20
to TiddlyWiki
G'day,


Now, I make use of a transclusion template.  See 2 images below, and find related tiddlers in my TiddlyWiki:  https://intertwingularityslicendice.neocities.org/CJ_ProductReviews.html

Cheers !


ModalWindow.png



TiddlyWiki Modals.png






David Gifford

unread,
Oct 10, 2020, 11:08:15 AM10/10/20
to TiddlyWiki
Wow, this is really nice, Charlie! I am already incorporating this into a project I started today.

It makes me wonder how to tailor the CSS for the link, and how to uses aliases with this. I don't see answers yet on tw.com.

Charlie Veniot

unread,
Oct 10, 2020, 11:37:46 AM10/10/20
to TiddlyWiki
G'day David,

I'm not particularly big-brained on any of this, even less so with CSS.

That said ...

Assuming you keep your aliases for your tiddlers in an "alias" field for each tiddler, then (if I understand what you're thinking):

<$button message="tm-modal" param={{!!title}} class="tc-btn-invisible" style="color:#0a00ee; text-decoration:underline;text-decoration-color:#0a00ee;">{{!!alias}}</$button>

Regardless, I'd love to see what you come up with when you come up with.

Cheers !

David Gifford

unread,
Oct 10, 2020, 11:52:47 AM10/10/20
to TiddlyWiki
This is longer, but you can create an editortoolbar button to insert it

<$button class="tc-btn-invisible tc-tiddlylink" message="tm-modal" param="X">(more)</$button>

Replace X with the tiddler to be modaled. (more) is the alias and can be changed. This gives a nicer option for links, and the opportunity to modify the link CSS. It also allows for aliases.

On Friday, October 9, 2020 at 9:16:29 PM UTC-5 Charlie Veniot wrote:

Atronoush Parsi

unread,
Oct 10, 2020, 12:49:16 PM10/10/20
to tiddl...@googlegroups.com
Hi Charlie,
 Many thanks for this. Your approach to use specific titles (e.g A HOWTO) makes it simple to search and find the topic in Google forum.
I highly recommend to setup a HowTo Wiki and just give a link here, this way one can simply find these great stuff later for further use.
Also after a while we have a repo of useful tips and tricks in Tiddlywiki.

--Atro

--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e3013433-f3fe-4c68-978d-22d739b0d8a5o%40googlegroups.com.

amreus

unread,
Oct 10, 2020, 12:58:05 PM10/10/20
to TiddlyWiki
One small note - You  can use the "tc-tiddlylink" class instead if you want to match the style TiddlyWiki uses for links.

Charlie Veniot

unread,
Oct 10, 2020, 1:35:58 PM10/10/20
to tiddl...@googlegroups.com
Now that is fun stuff.

Being a smidgen CSS-averse, I tend to try and do things with alternative means.

I see "(more)", and I think:  if the tiddler has alias field, then use the value in alias, otherwise, use "(more)".

Regardless of my normal desire to run for the hills when the topic of CSS comes up, I am wildly interested to see the full guacamole of your work.

Charlie Veniot

unread,
Oct 10, 2020, 1:56:00 PM10/10/20
to tiddl...@googlegroups.com
I keep wanting to setup a TiddlyWiki with HowTo's, but I am always frustrated with how TiddlyWiki URL's to tiddlers work.

Being a tweaker by nature, I always start with good enough Tiddly Wiki titles and iteratively/incrementally am always refining them titles, approaching some far away "perfect" title.

Setting a fixed title, never ever to be changed, with some descriptive alias (that I can freely refine with no effect on URL's to particular tiddlers) doesn't float my boat much.  I still get annoyed and thrown off by the fixed title that at some point no longer feels right.

Being a longtime user of, RIP, "ProjectForum", I've always liked that each wiki page has an internal unique ID number.  Wiki text page links are all titles of the pages, but navigating the wiki via those links (and sending links via email, or copying links into web pages) never include the page name in the URL's.  The unique ID number of a page goes into the URL.  So it never matters if a page name changes.  The name is changed everywhere in the wiki text there is a reference, but the URL's are always static because ID number is used.

So setting up a HOWTO in a TiddlyWiki and providing URL's to some tiddler, things get screwed up anytime I want to tweak the title of a tiddler, because previously provided links to the tiddler no longer work.  That bugs the daylights out of me.  If TiddlyWiki did the URL thing like ProjectForum, then it would be no sweat for this hard-headed fella.

Ugh.  I guess I needed to have a blathering opportunity today ...

Charlie Veniot

unread,
Oct 10, 2020, 2:00:56 PM10/10/20
to tiddl...@googlegroups.com
That's a very good idea, but I've been on the fence about that for a long time, chewing on some kind of design that distinguishes:
  • external link
  • internal tidder link that opens the tiddler in the story river
  • internal tiddler link that opens the tiddler in a modal
  • can't think of other scenarios at the moment...
I've kind of left that to the subconscious back o' me sponge for many months, waiting for that a-ha moment (or "give it up" moment?) to strike.

Yeah, kind of in a paralysis by analysis about the design of every day things...

TW Tones

unread,
Oct 10, 2020, 5:00:04 PM10/10/20
to TiddlyWiki
Charlie,

As I may have mentioned before I am building a solution with tiddler serial numbers. 

However, The relink plugin works well to permit tiddler renames whilst retaining the links and references.

However a tiddler serial number TSN allows this to go a lot further. That is why its taking me longer, I want to be sure the fundamental design is extensible.

This method will issue any new tiddler you want a tsn field containing a unique value that never changes. A set of link tools will allow you to link to the tiddler with a given unique TSN, regardless of the title name. I may make use of the TOCP plugin or the alias plugin. Titles do always need to be unique, but if you wish you could use the tsn as all or part of the name if you want until you choose a better name perhaps.

I hope to build a set of tools for the automatic naming of tiddlers.

by the way I understand where you are coming from with "frustrated with how TiddlyWiki URL's to tiddlers work." but is passes once you learn all the tricks.

Regards
Tones

Charlie Veniot

unread,
Oct 10, 2020, 7:26:52 PM10/10/20
to TiddlyWiki
G'day Tones,

I love Relink.  I would go insane without it.  However, it does not (nothing short of completely changing how TiddlyWiki works) fix this problem:


Sharing that link above (emails, websites, etc.), every instance of that shared link gets borked the moment I change the page name, doesn't it?

Is there a trick to provide a link to a tiddler without including the tiddler name in the link?

TW Tones

unread,
Oct 10, 2020, 8:00:08 PM10/10/20
to TiddlyWiki
Charlie,

Since the tiddler name is the unique key to a tiddler, if you the capture link to a unique tiddler it simply depends on maintaining the title or the link will die. The links are a snapshot in time.

You could create a tiddler you plan to never rename, and to do this, but to allow you to rename the content tiddler you could make a kind of landing page be it a list of battery reviews or include a specific review

eg tiddler title "Battery Reviews" 
Containing {{Battery-Powered Equipment}}


Perhaps we could create a rename inhibit method to resist renaming when it is such a "reference" tiddler used in (exported/reposted) links.

Regards
Tony

TW Tones

unread,
Oct 10, 2020, 8:10:31 PM10/10/20
to TiddlyWiki
Charlie,

I modified the core tiddler attached to demonstrate rename inhibiting

$:/core/ui/EditTemplate/title


With this in place set the field rename-inhibit to yes on any tiddler and you can't change the title in edit mode. Without changing or deleting the rename-inhibit field

Remember overwriting core tiddlers may cause problems after a upgrade.

Regards
Tones
rename-inhibit.json

Charlie Veniot

unread,
Oct 10, 2020, 8:48:19 PM10/10/20
to TiddlyWiki
Hey Tony,

That is a totally reasonable and sane approach.  I'm just too darned set in my ways/thinking (stubborn, crotchety, pig-headed) to go there.  Maybe too many years of making sure Oracle database tables always use automagic internal sequence numbers as primary key values because primary keys based on real-world "business values" are often brutal headaches waiting to happen.

When I develop the courage, maybe I need to create some kind of mechanism so that a non-existent #tiddler URL reference triggers a tiddler-name-change-list lookup (something that automagically gets updated upon change name of any tiddler, but still allow edits) to redirect the URL to a tiddler via the new name.

Boys oh boys, I'm going to need to let that ferment (slow-cook, dry-cure ...) in the back o' me sponge for a while ...

kuzi

unread,
Nov 6, 2020, 12:03:49 PM11/6/20
to TiddlyWiki
@Charlie,

Is your transclusion template still working? I'd like to implement something like this for my personal wiki, so that I may build my own glossary. On visiting your site, it looks like the template is not functioning properly. Should it still be working, or are there any alternatives someone can refer me to?

Charlie Veniot

unread,
Nov 6, 2020, 12:13:18 PM11/6/20
to TiddlyWiki
G'day kuzi,

If you wouldn't mind, can you let me know what isn't working?  (link to the specific tiddler, if you wouldn't mind.)

The template seems to be working fine to me.  Please see this tiddler (i.e. AC Output#️⃣CF400 ) to see how the link for the "Pass through charging" tiddler is setup for opening the related tiddler as a modal with help from the transclusion tiddler.  (btw: I am using the Chrome web browser, if it matters any.)

Cheers !

kuzi

unread,
Nov 6, 2020, 12:30:26 PM11/6/20
to TiddlyWiki
Charlie,

Thanks for the quick response! Somehow, I got to this tiddler, which appears to be the wrong one. I was able to copy your template successfully, and it works exactly like I wanted. Thanks a ton!

Charlie Veniot

unread,
Nov 6, 2020, 12:43:46 PM11/6/20
to TiddlyWiki
Hey, thank-you, kuzi, for letting me know.  I was worried that I had gone and broken something in there.

If I can do something via transclusion instead of via macro, I much prefer transclusion (just the way this quirky sponge of mind works.)

Glad that is of use to you !

BTW: just for a fun alternative, check out the "Charge Indicator Issue?#️⃣EafuBEE3" tiddler and how it shows the links for the tiddler "HOUSBAY Digital Alarm Clock" via the fLb transclusion template.
Reply all
Reply to author
Forward
0 new messages