[INTRO] Link to Tabs Plugin - Add Hyperlinks to Tab Buttons

Link to Tabs Plugin

adds an hyperlink icon to every tab-button

  • This plugin is particularly useful if you use the tabs-macro a lot
  • It can help you, to easily create and modify tabs

Important

  • The edit-tabs plugin is deprecated for maintenance reasons and because it needed a browser reload. Installing link-to-tabs does not need a reload.
  • Edit tabs is replaced by link-to-tabs v3.0.0

Demo

Compatibility

The new link-to-tabs macro uses the conditional syntax: <% if xx %>, which was introduced with TW v5.3.3. So it will only work with latest TW versions.

If you need an older plugin versions use the v5.3.1 compatible library instead.

Show Older Library Versions

Screenshots

Configuration Options

Settings can be found directly in the plugin-info panel or at the $:/ControlPanel → Settings → WikiLabs → Link to Tabs tab

  • [ ] Show internal tab link for all tabs
  • [x] Show internal tab link for selected tabs
  • [ ] Tab links are initially hidden and need mouse hover to become visible.
    The transition time in seconds is: 0.3
  • [ ] Clicking a tab-link opens non-shadow tiddlers in edit mode
  • [ ] Clicking a tab-link opens every existing tiddler in edit mode

  • [x] Show internal tab link for all tabs

Edit Tabs Functionality

The goal of the following 2 settings is, to have maximum flexibility and still protect “shadow tabs”. Tabs from the TW core or from plugins should not be overwritten by the plugin. The user has to actively choose to do so.

  • [ ] Clicking a tab-link opens non-shadow tiddlers in edit mode
    • This setting will open links to tiddlers in edit mode, even if the tiddler does not exist yet.
    • If the tiddler title is a shadow tiddler, the link will be opened. The shadow tiddler will not be overwritten - So the user has to actively overwrite a shadow tiddler.

  • [ ] Clicking a tab-link opens every existing tiddler in edit mode
    • This setting will open every existing tiddler in edit mode.
    • So system tiddlers will be opened in edit mode
    • It will not automatically create non existing tiddlers.

Create a Link to Tabs Bookmark

Bookmarks can be created from eg: the plugin overview by

  • Dragging the plugin-tiddler onto the bookmarks bar
  • Important: Rename it to eg: link-to-tabs

Importing Link to Tabs From the Browser Bookmarks Bar

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 below.

If you want to have the link-to-tabs in the TW ControlPanel you can import the plugin from the browser bookmark toolbar into tiddlywiki.com or any other wiki.

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


WikiLabs Suite

The WikiLabs Main Page gives an overview about all editions, plugins and themes.

There is an Introduction Video how to make the WikiLabs Plugin Library available in your own wikis, accessible from the ControlPanel → Plugins → Get More Plugins dialogue.

Show Screenshot

Code

About Open Source

Most open source software is free of charge and that’s a good thing! But that does not mean, that there are no costs for someone to create, support and maintain it.

So if you use it: Support it!

Have fun!
Mario

1 Like

@pmario would it be possible to edit tiddlers with a ctrl-click on the link to tabs?

Probably yes, but it should also work with mobile devices and I don’t want to “bloat” the code even more.

The plugin does overwrite the core tabs-macro. So it should be as simple as possible.

I did include the edit-tab functionality for only one reason. I do not want to maintain 2 plugins, that are 95% the same. The problem with edit-tab is, that it contains ultra old wikitext and some js-code, which needs a browser reload.

The problem with link-to-tab now may be incompatibility with older wikis. That’s why I did include the link to the older library versions.

I personally will create 2 browser bookmarks: A v5.3.1 compatible to be used with older wikis and the “latest” version.

Yes, thanks for letting me know, I love “link to tabs”, but I also have an extension that modified this macro. The “core tabs-macro” is a valuable component used through out tiddlywiki, unless we could make it more hackable, it would be worth trying to put features like this into the core macro.

There may be an opportunity to add more flexibility to the tabs-macro code with the core UI rewrite using procedures and functions.

I thought here would be the best place to ask questions; Would a modification of this be possible so that if a tiddler has a specific field, it shows an icon at the top right of the prettylink?

I.E. if a tiddler has a field of url, it would show an external link icon just after the prettylink, and that icon would have the field value from the url field, so if it were pointing to a website it would show that, or if it were a link to an external document it would go to that instead.

I imagine it could be called “Link to Fields” or “Link to URL” or… something akin to that, it just seemed like it would fit right along with Link to Tabs

If you search for “external link icon” Search results for 'external link icon' - Talk TW here in the forum there should be several solutions.

1 Like

Well l, now don’t I fell silly.

I should have tried different ways of wording it when searching for it initially haha

I really like the idea of this plugin after playing around with it, but I might have to make a version for myself that just creates an alternative tabs macro with the links, rather than overwriting the core tabs macro, just because:

  1. I prefer to avoid overwriting the core if I can avoid it

  2. I would prefer to avoid having this plugin apply to the tabs menus in the sidebar? I use tabs pretty heavily for navigation within my own wiki content, but I would almost never need to open a link to any of the core system tiddlers in the sidebar, so the potential for having it there isn’t necessary for me and mostly just mildly annoying whenever I misclick on one of the link buttons

I think the ideal version for me might be one that just let me write a filter for what tabs to apply the button to, based on the value of the currentTab variable… That way I could just set it to [!is[system]] or something, and others could customise it as they wished.

Anyway, just wanted to share my thoughts. This is a really awesome plugin though, so thanks @pmario for the work!

I’m importing this and some others of my plugins from the “browser bookmarks” bar. So I can easily use them with tiddlywiki.com or any other wiki on the web.

At the moment it’s very hard to implement “tab-badges” without modifying the core marcros. – But since I’m rewriting some of the core macros at the moment using TW v5.3.x syntax, it should be possible to make it easier in the future.

So the next iteration of the tab-macro may have a “badge-template”, that can be added “on top” of the existing core macros.

… just brainstorming – no promises :wink:

Just as we recently did with the toc macros I also have some simple mods for tabs and tags macros which add substantial value.

  • I intended to have them introduced to the core someday
  • So please create or point me to a discussion on each

@exilegreen the existing tabs macro has a buttonTemplate parameter I believe is there to replace what we think of as the tab.

  • I still need to research this, but we may be able to use this to introduce some tag based additions to tab handling that a future version of link to tabs could also use.