Hi everyone,
I'm back hacking at my RPG Tiddlywiki, and I have a few things figured out (conditional ViewTemplate and EditTemplate stuff).
I'm stuck on how to implement the following:
I have a ton of tiddler fields that are specific to a tiddler type (Player, Character, Location, etc). I have made custom UI to display in a tiddler's ViewTemplate and EditTemplate if it is tagged with one of these core types. The conditional EditTemplate allows editing a formatted set of fields (hiding their field names for more friendly names). These are fields that start like contact.*, character.*, ruleset.*. I would like to hide these specific fields from being displayed at the bottom of the normal EditTemplate.
I understand that the usual way of doing this would be to create a bunch of tiddlers in the namespace:
$:/config/EditTemplateFields/Visibility/*
But, I want to avoid having to track individual tiddlers for fields like that (I intend to have a lot of fields).
----------------
So! How can I edit the $:/core/ui/EditTemplate/fields tiddler so that those fields with prefixes in my list are not displayed? Ideally, with a way to toggle that function so that you can hide or show the "duplaicate" fields in the EditTemplate.
I have something working by storing some Regex in my $:/config/EditTemplateFields/Hidden/prefixes tiddler's text field and editing the Filter in the EditTemplate tiddler from:
[all[current]fields[]] +[sort[title]]
to:
[all[current]fields[]!regexp{$:/config/EditTemplateFields/Hidden/prefixes}] +[sort[title]]
But this means that I have to manage that Regex string myself, which will get unwieldy when that list grows. Currently, for 2 prefixes the Regex looks like:
^contact\.|^ed4\.
And that successfully hides all fields that start with "Contact." or "ed4." But I'm stuck on how to toggle this or manage it going forward.
Any ideas?