Custom fields and special characters

81 views
Skip to first unread message

Santi

unread,
Dec 14, 2018, 12:26:05 PM12/14/18
to TiddlyWiki
Hi,

I'm trying to populate a Tiddlywiki with some health information like a database. 

My idea is to structure the information in lists: list of doctors, list of drugs, list of diets, etc.

Every record on the list will have each associated tiddler and main tag.

I want to show every list in a table format showing the list of fields related to each record. For example: doctor's location, doctor's speciality, etc.

To show the information of the lists, records and fields in a table format I'm planning to use Jed Carty Dynamic Tables:

My main concern is about how to handle fields and localization.

The contents of the wiki will be written in spanish but I want to setup everything in a neutral approach. In order to accomplish this I've decided to:
- Use the standard english Tiddlywiki version
- Write tiddle titles and tags without special characters (like accents, etc.) and use the caption field to show these special characters when rendered.
- Follow recommended conventions for custom field names: lowercase, no spaces, no special characters, etc.
- Field values will have special characters if needed

So my question is:
- Is there a way to associate a caption-like value to a field name? For example, "location" in spanish is "ubicación" (with accent). I would like to name the field "ubicacion" (no accent) but show "Ubicación" (Capital and accent) whenever it is rendered. Maybe I can use a dictionary for that?

Thank you very much for this great product and your help.


Mark S.

unread,
Dec 14, 2018, 1:41:10 PM12/14/18
to TiddlyWiki
 You might consider re-posting this as "Custom fields using Jed's Dynamic Tables".  Otherwise he might miss it in the daily mail.

I looked at his code -- another masterpiece, of course -- and it looks like it would be possible to make some small changes that would pull captions from a data dictionary. It would involve adding one small macro (e.g. ThisFieldCaption) and then replacing it wherever <<ThisField>> is used for display (but NOT where it is used for input). I don't know if that is a complete solution (it worked with "Simple Tables") so, as I said, you might post this so Jed will be sure to see it.

Good luck!
-- Mark

TonyM

unread,
Dec 15, 2018, 12:00:35 AM12/15/18
to TiddlyWiki
Santi,

You may be able to use the uni-link plugin to have an alias in addition to caption for your accented names.

As you suggested a datatiddler as a dictionary with unaccented and accented items. You could build a macro that displays any word with an entry using the accented version.

Regards
Tony

Jed Carty

unread,
Dec 15, 2018, 5:27:02 AM12/15/18
to TiddlyWiki
I think that Mark has the right idea. I had considered making something like this to go with the macros but I wanted to keep them simple and there are probably a lot of edge cases that would make it a pain to implement in a general way.

But if you just replace the part that displays the field name with a view widget that displays that index of a data tiddler instead it should work.
Reply all
Reply to author
Forward
0 new messages