Link to tiddler without changing the address bar

I’m working with the MermaidJS plugin, which allows to draw complex graphs with clickable nodes among other things. I would like to create html links to various tiddlers from the nodes by specifying the tiddler like this: #sometiddler. That works but the address bar changes. Is there some magic to prevent that?

As a matter of fact, how is does it work in TW that tiddler links don’t normally change the address bar?

This will be very useful. Currently two MermaidJS plugin in CPL don’t seem to have this featrure.

What is this? Shouldn’t link be [[xxx]]?

Do you mean when click on link? This is intended, if you turn on Navigation Address Bar

Drop the attached on Mermaid TW5 Plugin — http://github.com/efurlanm/mermaid-tw5, nodes are clickable links but forces the address bar change.Clickable Nodes.json (343 Bytes)


flowchart LR
    A-->B
    B-->C
    click A "#HelloThere" "HelloThere Tiddler" _blank
    click B "#Tips" "Tips Tiddler" _blank
    click C href "#Issues" "Issues Tiddler" _blank
    

See this post: Dynamically Generating Mermaid Diagrams

1 Like

Yeah, I want the address bar not not change :slight_smile:

I meant in an HTML link like so <a href="#sometiddler">blah</a>

When I click on internal links in TW, the address bar doesn’t change. I was wondering if there was a way to emulate that behavior using straight html basically.

Surge,

The thing about HTML links is they need to work if clicked in a wiki and if the link were outside a wiki, thus if you name a specific tiddler it navigates to it and the browser updates the address bar. When you use the [[tiddlywiki link]] method it can intervein and navigate within the wiki, thus need not give the browser the full url.

The best solution I can see is to get the mermaid plugin to allow you to provide the tiddler title to render correctly so the link just works as you expect.

Alternatively perhaps a special macro or button to extract the title and navigate to the tiddler rather than construct or save the html link.

Elaborating … The post linked above explains that you want to use the eventcatcher widget to capture the click event and call a macro that invokes an action-navigate widget to navigate within TiddlyWiki without changing the address bar. You’ll pass the Tiddler title as the href link in the mermaid text for the click event. The event catcher will find the tag with the class “node” containing the href value, which is just the tiddler title, and navigate you to it using tiddlywiki navigation, rather than browser navigation. This is a specific implementation of what TW_Jones describes, below.