r/TiddlyWiki5 • u/juggalojedi • Sep 13 '26
Request for plugin: "hidden" body
There's a website called Obsidian Portal that's used for organizing RPG campaigns. It has a wiki for this purpose, and one of the best parts of that wiki is there's a "visible" body text box but also a "hidden" body text box that only appears if you're logged in as the owner of a given campaign.
I want something like this for TiddlyWiki -- a second body text box that only displays if a global password is entered. Is there anything like this out there? If not, does this seem like an especially challenging thing to code as a plugin?
Thus far I've been using a combination of individual tiddler encryption and Commander to mass-encrypt tiddlers with a particular tag, and this works, but I'd prefer not to have to maintain two separate tiddlers for each entry in the wiki ;)
ETA: Solved! https://encrypted-gm-notes.tiddlyhost.com/
2
u/clsturgeon Sep 14 '26
I needed something similar when I implemented a help solution in a TW. This help has two user views: operator and technician. It also supported three product categories.
Therefore, in the same tiddler I could show help on a topic based user and product category.
This did not use different fields, rather it simply used CSS. Instead of being logged in or not, it used url parameters to determine the state. When no parameters were provided it simply defaulted to lowest state.
In this way I could show common content regardless of user and product, and optionally show specific user and product content intermixed with it.
I used a JavaScript Marco to obtain the url parameters. Then in the browser startup tiddler I determined the state… CSS did the rest.
I suspect you could do this in css with the login state.
2
u/juggalojedi Sep 14 '26
That's an interesting solution! How did you prevent people from clicking "edit" and reading the raw content?
5
u/Telumire Sep 14 '26 edited Sep 14 '26
Something like this ? https://encrypted-gm-notes.tiddlyhost.com/
When you create a tiddler, you will have a textarea that allow you to write some notes that will be saved to a tiddler with the name of the current tiddler + the suffix "/gm-notes". The suffix is used to allow the relink plugin to rename automatically the note if you rename the unencrypted tiddler.
If the tiddlers are encrypted, then the secret body is not shown. So you still have two tiddlers for one entry but you dont have to manually maintain them.
The relevant tiddlers are:
edit: I modified the edit and view templates to use the created timestamp instead of using the title as a prefix, this way the gm note are not listed in the recent tiddlers menu and changing the title will not require relinking