How do you include a hyperlink on the tabs in the tabs macro?

Greetings to the TW Community.

How can one do this:

2023-09-28 12-31-29

I’ve tried to see how it works by editing the tiddler itself and looking at its “innards”, so to speak, and also at the tabs macro documentation but I couldn’t figure it out. Please help.

1 Like

See Wikilabs Home — A home for: Plugins, Editions and Themes!

https://wikilabs.github.io/editions/link-to-tabs/

https://tw-cpl.netlify.app/#Plugin_202203243727508

2 Likes

Thank you for this @linonetwo!

Try this (no plugins needed):

  • In your tabs macro usage, add buttonTemplate:"TabLinkTemplate". This indicates that the tab buttons should be custom rendered using TabLinkTemplate
  • Then, create a tiddler named TabLinkTemplate, with the following contents:
<$text text={{{ [<currentTab>get[caption]else<currentTab>] }}}/>
<$button to=<<currentTab>>
   style="display:inline-block; width:auto; border:0; padding:0; background:none;">
   {{$:/core/images/link}}
</$button>

Notes:

  • Line 1 displays the caption or title text of the current tab
  • Line 2 creates a $button that, when clicked, opens the tiddler for the current tab.
  • Line 3 overrides the default tab button styles so the link $button appears as a simple inline clickable image, without any border, padding or background color.
  • Line 4 displays the TWCore shadow “link” image
  • Line 5 ends the $button widget

enjoy,
-e

4 Likes

Link-to-tabs is a plugin, that can be used without restarting the wiki. So it’s possible to import it into any existing wiki, that contains tabs and get the behaviour shown in the OP.

I personally use and created it as a development tool, to examine tabs from 3rd party plugins / wikis

So for example: If I want to have the link-to-tabs in the TW ControlPanel I can import the plugin from the browser bookmark toolbar into tiddlywiki.com or any other wiki, where I do not have write access and the functionality still works.

I’m using FireFox with a Bookmarks Toolbar, which contains several of my plugins

If the plugin is active it works with all existing tabs

There are several settings to customise the behaviour

4 posts were split to a new topic: Installing Plugins using Browser Bookmarklets

That’s an old one. link-to-tabs v2.3.0 is latest atm

Bookmarks can be created from eg: the plugin overview by

  • dragging them onto the bookmarks bar
  • Rename it
  • Important: They do not work without renaming