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/ 
<file:///C:/Users/Joshua/Documents/Tiddlywiki/earthdawn4/Earthdawn4_06.27.2017.html#%24%3A%2Fconfig%2FEditTemplateFields%2FVisibility%2Fcreated>
*

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?

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/04315eb6-6b09-4176-95f8-043d7c86b9a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to