Hotzone plugin question - Or: how can I highlight the tiddler that is currently in view in the sidebar?

  • What I’m trying to do:

I want to highlight the tiddler that is currently in view in the sidebar (in the open tab). No particular style in mind, I’m ok with a simple underline.


I’m almost there, because I found a working solution in TiddlyWiki xp, but I can’t replicate it.
Here, the plugin HotZone is being used.

Tiddlywiki-xp > Here, the tiddler $:/temp/focussedTiddler can store in its text field the title of the tiddler that is currently on focus on the screen. And here it can also store a “draft of ‘title’” but when I try to do the same in an empty tiddlywiki the “draft.of” title is not stored, and only the tiddlers I’m not editing are considered.

Can someone tell me why this happens?


Interested tiddlers for the sidebar behaviour:

$:/xp/leftopentab/macros
$:/core/ui/SideBar/Open


Now I talked about HotZone because I think I'm very close to the solution, but if anyone can recommend an alternative solution that they think is better, that's welcome; I have no preference as to which mechanism allows me to do this

How can I highlight the tiddler that is currently in view in the sidebar?

if you look closely at the tiddlers in the tag pill dropdown, and the open tab they make use of the list-links-draggable or list-tagged-draggable Macros (Both are defined in $:/core/macros/list ) or the draggable widget.

By wrapping the list item in underlines, if the list item matches the “current tiddler” we can always highlight the current tiddler in the list.

  • I will investigate how to do this effectively and where for maximum benefit.

I don’t quite understand, but I’ll investigate. Thanks for the tip

Sorry I will be a bit clearer.

  • I have being working on a range of related tools, and there is half a dozen locations where it would be useful to highlight a tiddler within a list such as the currently focused tiddler (eg open tab), or all open tiddlers (in the recent tab).

  • The follow package just for the tags dropdown is a Work in Progress unterline-current in tag dropdown.json (1.6 KB) try it on tiddlywiki.com

    • Note it modifies $:/core/ui/TagTemplate

More info;

As you know the open tab shows all tiddlers open “in the story” there is not necessarily a single tiddler we would call “the tiddler”. As you suggest Tiddlywiki xp sets a $:/temp/focussedTiddler and I don’t know how that works, you will need to follow its logic to find out.

However in my own focused tiddler solution I use the content of $:/HistoryList!!current-tiddler which contains the last navigated to tiddler.

  • In the side bar it shows the focused tiddler, and the Focused tab includes a display of its fields.
  • To make the “current focused tiddler” a little more “deterministic” I have added the target and cross hairs icon on each tiddler, click to make it green and focused. Basically it navigates to the current tiddler to bring it in focus.
  • My focused tiddler package can be found at $:/PSaT/focus-tiddler
    in which you may find the code you are after. However it is perhaps more complex than you are after. I doubt you want the pin to top.

I will just restate for the “current tiddler” to indicate in the open tab consider using $:/HistoryList!!current-tiddler

Eg ’ [all[current]match{$:/HistoryList!!current-tiddler}] if the open tab uses current Tiddler. If this is what you are seeking.

You are correct, indeed the tiddler $:/temp/focussedTiddler is used to store the title of the tiddler that is currently in focus. But you are wrong in saying that the plugin responsible for this behavior is the HotZone plugin.

  • Instead the correct plugin is $:/plugins/Gk0Wk/focused-tiddler.
    Both plugins use the same temp tiddler $:/temp/focussedTiddler, I got confused too when I tried to resolve the issue.

Use that plugin and you will see that it will work ;)

1 Like

Thank you! I hadn’t noticed