Closed agichim closed 2 years ago
Hi @agichim,
in a way, this feature exists, but only for the "live view"
my view
tmap.open-view
with value my view
.You can check this effect out at http://tiddlymap.org – when scrolling to the "Getting started" tiddler, the live view will display the "overview map".
Apart from this, intercepting a click on a tiddlywiki-link (e.g. a click on [[like so]]
) is unfortunately not possible and thus cannot be implemented.
Hi. Ah, alright. Thanks for the reply.
Actually this feature is completely possible. You just need to use invisible buttons, which is a pretty common TiddlyWiki core practice. Here's a macro for you
\define set-view(view, caption)
\whitespace trim
<$button class="tc-btn-invisible tc-tiddlylink">
<!--
Uncomment this and add a "tiddler" argument if you also want
this button/link to open a specific tiddler at the same time.
<$action-navigate $to=<<__tiddler__>>/>
-->
<$action-setfield $tiddler="$:/plugins/felixhayashi/tiddlymap/misc/defaultViewHolder" text=<<__view__>>/>
<$text text={{{ [<__caption__>!match[]else<__view__>] }}} />
</$button>
\end
<<set-view MyView "Switch to my view">>
Hope this isn't too late. I'm working through the backlog, and I wasn't around when this issue opened.
Hi,
The title is descriptive enough I believe. It's the same concept to how you open a tiddler from within another tiddler by using double brackets [[like so]].
If this exists already, I wasn't able to find it.
It would be a good implementation.