Hiding the sidebar when viewed in the permalink mode

When the wiki is viewed in homepage mode (e.g. example.com/wiki.html) it should show the default user interface, with sidebar and stuff.

But when I want to send people a link to read a particular tiddler via a permalink (e.g. example.com/wiki.html#some-tiddler) I want to hide the sidebar (and perhaps all buttons) so that it looks like a normal simple html page without any user interface.

Is there anyway to achieve this?

(I know how to hide sidebar at startup but I only want this when the url is .../wiki.html#....)

Hi Pak, Welcome back,

One way is to generate static tiddlers and provide a link to the static tiddler instead. Try exporting any tiddler Tiddler Toolbar > More > Export tiddler > Static HTML and place a copy next to your wiki on your host. Establish the html link and test then share that link to the static tiddler.

But this may be is easier if you are hosting your wiki on nodejs, see Generating Static Sites with TiddlyWiki

The other way is to set up some start up actions that when a particular tiddler or tiddlers is loaded see the Info Mechanism for the URL information then the various actions such as hide sidebar etc… are done.

  • You may want to look at some of the read only wiki solutions for button selection.

Thank you. I used to generate html pages with node.js. The thing is my wiki is quite dynamic - I updated the contents very often. So having to generate lots of html files often is not ideal for me.

I was hoping there would be an internal variable in TW that shows the url as it displays on the browser. Looking at the link to info mechanism you gave me, what came close is $:/info/url/full. But sadly it still does not show what comes after https://tiddlywiki.com/ even though the url in my browser reads https://tiddlywiki.com/#InfoMechanism. Oh well I’ll keep looking.

Pak, it sounds like your situation may be a variation on the need to distinguish author vs reader mode, which has a number of threads here. If so, see (for example):


@Pak is you wiki hosted the internet on node? Or only on your computer?

There is a way to automatically and simultaneously publish static tiddlers along with you wiki if you are using node. You can also influence this via the template used to publish these static tiddlers.

  • We need to establish more about your setup to help.
  • Its easy to append a tiddler name to the full url but we need to know little more
  • Have a look at the permalink copied with the permalink button
  • Consider saving your wiki as index.html then you do not need to include the wiki file name in the url

To be clear to meet you need we either;

  • Link to a tiddler in the whole wiki with a custom view of the wiki hiding the rest
  • We publish a standalone view of all or selected tiddlers that look as you want them to, and they have their own URL.
1 Like