I would like to prevent the transclusion of tiddler text based on the evaluation of a filter.
Example
Let’s say I have a tiddler called No Transclusion
with the field prevent-transclusion
. I would like {{No Transclusion}}
and equivalent transclusions to produce empty text.
Motivation
I am trying to develop a system where information is available to specific users in the wiki but not to others. I may have a tiddler that I want User A and User B to see the content of, but User C should not be able to. And perhaps a tiddler that only a specific user can see, ex Tiddler A
, Tiddler B
, and Tiddler C
for the respective users.
This would not need to be a super secure system, I would just like it to be fairly difficult (non-obvious) to access the obscured information for anyone proficient with basic editing of tiddlers / tiddlywiki.
Attempts, Problems, and Ideas
I have figured out how to hide the body of and prevent editing these tiddlers based on a filter condition (thank you cascades). The problem I now have is that both can be bypassed easily by transcluding the tiddler into another.
I could (probably) disable editing on the wiki for my users (and make sure that I don’t transclude anything I don’t want shown). This would certainly solve the problem, but I’d like to avoid that so my friends who may work on similar wiki projects can learn from mine.
I am open to alternative approaches if there is a better way to accomplish the functionality that I want. I’d prefer solutions that don’t involve modifying the core/shadow functionality, but I am okay doing so if needed.
System Details
OS: macOS Monterey
Browser: Chrome
Tiddlywiki: v5.2.2
I am running Tiddlywiki using Node.js locally on my machine and hosting a build for my users on GitHub via GitHub pages.
Any tips or suggestions are greatly appreciated!