Multiple TddlyWiki's and Browser Tab Management

176 views
Skip to first unread message

TonyM

unread,
Jan 10, 2019, 1:38:35 AM1/10/19
to TiddlyWiki
Folks,

I just wanted to share a new code pattern I built recently

I use firefox and chrome on Windows 10
  • The following linkintab macro will always open in the same browser tab, even if it is already open.
  • If your links to wikis use the target parameter you can ensure you do not open the wiki more than once. 
  • You are also protected if you try and reopen the tab and you have not saved previous work.
  • In Fire Fox, if you move a tab to its own window, and click the link again it will open that windows again (and reload) - if it was minimised it will restore it.
Why do this?
  • It allows you to keep tabs closed and open them as needed without fear of saving over the same wiki (Even without using bob)
  • You can establish a Directory Wiki to other wikis that honours this reusable tabs method.
  • No need to go looking for existing tabs, windows or minimised browser windows, just return to your directory, reopen if not open, reload in same tab if open (and saved)
Limitations
  • I have not yet worked out if I can do this with file links to Timimi Wikis.

If you want to use multiple Browsers eg FireFox and Chrome and may open the same wiki in either, I recommend you use Bob to host them so you gain further protection if the wiki is open in more than one Browser given Bobs multi-access ability.


\define linkintab(link tabname)
<$set name=url value="$link$">
<$set name=tabname value=$tabname$>
 
<a href=<<url>> target=<<tabname>> ><<tabname>></a>
 
</$set></$set>
\end
<<linkintab "https://www.w3schools.com" W3Schools>> Will open W3Schools tab in Current Browser
<<linkintab "http://127.0.0.1:8084/"Bob>>

In the follwing case
<a href={{##wiki-url-full}}  target={{##wiki-sitetitle}}>{{$:/core/images/link}}</a>
It is using data from a dataTiddler (the current Tiddler in a list)

And as the above macro shows the following also works
 <a href=<<url>> target=<<tabname>> ><<tabname>></a>

Feedback appreciated!

Regards
Tony

Mohammad

unread,
Jan 11, 2019, 12:59:51 AM1/11/19
to TiddlyWiki
Hi Tony,
Thank you for sharing. It really help me to prevent my browser tabs to crowded with repeated page.
One suggestion: There are occasions you open an external pdf and sometimes navigate to a certain page
it would be beneficial to support such case. I mean to open pdf file one time and clicking on lonktab navigate
to that page.

 I am using single file TW and little know about Bob, Where I should put the above code when using Bob? 


Thank you Tony.

--Mohammad

Mohammad

unread,
Jan 11, 2019, 1:15:17 AM1/11/19
to TiddlyWiki
Tony,
 Assume you have opened a wiki already from your wiki folder by double clicking and then from inside another wiki using tablink.
They will use separate tabs! I mean if only you open a wiki (html page) by tablink they will use the same tab not when they are opening
from different location.

Have a look and let me know if I am wrong.



--Mohammad 

TonyM

unread,
Jan 11, 2019, 6:25:48 AM1/11/19
to TiddlyWiki
Mohammad

I will look at pdfs and opening from multiple tabs. And will let you know.

I use a wiki that acts as a directory with links to all my wikis so did not notice that.

Thanks
Tony

@TiddlyTweeter

unread,
Jan 11, 2019, 6:42:12 AM1/11/19
to TiddlyWiki
On this one I'm unclear why one should bother?

In Bob I have occasionally on one computer done two openings knowing it knows how to handle it. But normally I can't see the added value of bothering to protect from an issue that looks like sloppy practice?

Not wanting to dis this. I just don't get the purpose.

Best wishes
Josiah

TonyM

unread,
Jan 11, 2019, 8:41:26 PM1/11/19
to TiddlyWiki
Josiah,

Bob protects you from the effect of the same wiki opening in many tabs if they are bob wikis. Bob does not stop you opening the same wiki in multiple tabs. The solution I proposed does.

In fact this solution could even work for bob, tiddlyserver and timimi files all at once in the same browser as long as the target of the link is set the same. By using a shortname of each wiki as the target name this works, want to spawn an additional tab use open in new tab/window.

Lets call these named tabs. If you open a wiki in a named tab from such a link, try and open it again, it will simply reload the named tab. This is also true if you move the named tab to its own window, it will reload the window and focus on it.

So you could have multple wikis windows and tabs open and give them focus as needed from a single or multiple directories.

Personaly I do not like searching for a particular open tab or window (I use 3 screens) when I can just choose the wikiname. If searching you may need to check all windows so you do not open it twice.

Now the value of this is of course related to your workflow, your windows and tab management practices, the number you have open etc...

I expect this tip may meaningless to some and meaningfull to others like myself. And regardless all may benifit from learning you can use named tabs when nessasary.

Regards
Tony

TonyM

unread,
Jan 11, 2019, 9:08:31 PM1/11/19
to TiddlyWiki
Example - use for Quick Access to Multiple locations in a Wiki

;TiddlyWiki.com key information
:<a href="https://tiddlywiki.com/#Filter%20Operators" target=tiddlywiki>Filter Operators</a>
:<a href="https:/
/tiddlywiki.com/#Widgets" target=tiddlywiki>Widgets</a>
:<a href="https://tiddlywiki.com/#Messages" target=tiddlywiki>Messages</a>
:<a href="https:/
/tiddlywiki.com/#WikiText" target=tiddlywiki>Wiki Text</a>
:<a href="https://tiddlywiki.com/#SystemTags" target=tiddlywiki>SystemTags</a>

Place the above in a tiddler, want TiddlyWiki.com info without too many windows?

Each time you click one of these it open the same tab, with the selected tiddler AND keeps the previous open.

Real Cool if you ask me.

Tony

Mohammad

unread,
Jan 12, 2019, 2:46:28 PM1/12/19
to TiddlyWiki
Tony,
 The last one does not work may be because of CamelCase labe: SystemTags

S. S.

unread,
Jan 12, 2019, 9:25:04 PM1/12/19
to TiddlyWiki
This line at the top of the tiddler should fix it.

\rules except wikilink

To see why, check out: \rules only

TonyM

unread,
Jan 12, 2019, 9:40:25 PM1/12/19
to TiddlyWiki
Can we also use >~SystemTags< in this case because they are litteral text, names not sourced elsewhere.

Tony

S. S.

unread,
Jan 12, 2019, 10:24:49 PM1/12/19
to TiddlyWiki
I tried ~SystemTags and it works both with CamelCase turned on or off. Only drawback is the link display with CamelCase off includes the ~

TonyM

unread,
Jan 12, 2019, 10:41:26 PM1/12/19
to TiddlyWiki
Yes, makes sense that the symbol to turn off camel case shows when there is no camelcase.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages