# Linking to TiddlyWiki Doc in Local Folder or Over the Net

For learning TiddlyWiki I take notes and link to official document. I normally save new release from tiddlywiki.com in my local folder, but it undergoes changes before new release.

My question is: How to write a macro to link to tiddlywiki in my local folder on click, and to https://tiddlywiki.com on shift+click and link

For example: This is part of a note tiddler

See more <<doclink "Filter Expression">>

• remote link: https://tiddlywiki.com/l#Filter%20Expression
• local link: file:///G:/TW/tw-5.2.5-full-doc.html#Filter%20Expression

Is there any solution better than using a macro like [...[..]]?

I have most of the solution for you, but not all,

• See below “this is missing”
\define wiki-address () https://tiddlywiki.com/#
<$list filter="[<modifier>match[normal]]" variable=~><$action-navigate $to="$tiddlername$"/></$list>
<$list filter="[<modifier>match[shift]]" variable=~> this is missing</$list>
\end
<$button actions=<<navigate-to-link-actions "$tiddlername$">> ><$text text="$tiddlername$"/></$button> \end <<doclink "ViewWidget">>  • In the above I need to workout how to “action” the link we can construct as follows [[$tiddlername$]addprefix<wiki-address>] • Normally we would construct ahtml “a tag” but in this case we want external navigation on a shift-button click action. • <a href="https://tiddlywiki.com/#$tiddlername$><$text text=tiddlername/></a>
• If I find / remember how to do this, I will come back but hopefully someone else knows.
1 Like

Thank you @TW_Tones
I understand how to use modifier. Is it possible to check from inside TiddlyWiki (using for example the browser info) if I have a working connection to internet! so, I decide to open the local link or the original link from official docs?

Well at least a working connection to the external link.

I expect this can be done from inside a javascript macro, someone could make into a tiddlywiki macro?
Eg

There are methods such as iframes and embed that will try and retrieve content but I am not sure you can then test it? Or refresh

 <embed src="https://tiddlywiki.com/static/ViewWidget.html" width="300" height="200">