Is there a way to customise the ORDER of fields in the EDITOR?

133 views
Skip to first unread message

Josiah

unread,
Jan 29, 2017, 6:06:40 AM1/29/17
to tiddl...@googlegroups.com
Ciao all

I found myself labelling fields ...

b1-booktitle:
b2-bookchapter:
g1-globalindex:
g2-wordcount:
... etc ...

This is to get them in the right order in the editor.

Is there a way to order them without me having to add prefixes?

Best wishes
Josiah


Jed Carty

unread,
Jan 29, 2017, 6:17:20 AM1/29/17
to TiddlyWiki
I am sure you could edit the edit templates to make this work, but I think that it would be better to just make a form to edit the tiddler fields you want to edit and then you can put things in whatever order you want.

PMario

unread,
Jan 29, 2017, 6:35:59 AM1/29/17
to TiddlyWiki
On Sunday, January 29, 2017 at 12:17:20 PM UTC+1, Jed Carty wrote:
I am sure you could edit the edit templates to make this work, but I think that it would be better to just make a form to edit the tiddler fields you want to edit and then you can put things in whatever order you want.

As Jed pointed out, you can change http://tiddlywiki.com/#%24%3A%2Fcore%2Fui%2FEditTemplate%2Ffields there is a +sort[title].

The problem is, that there is _no_ other parameter you can use for sorting. Fields are no tiddlers. So there is no meta data, like "modified" or "modifier", that could be used  for sorting.

It would be possible, that you add one tiddler per field-name, tag them, and use the tag-tiddler's list field for sorting. ... but that's probably not what you want. .. It depends on the number of different fields, that you have. If there are just a view, it would be easy that way. .. but still needs to modify the edit template.

have fun!
mario

Josiah

unread,
Jan 29, 2017, 8:22:57 AM1/29/17
to TiddlyWiki
Jed & PMario

That helps. And looks like enough to do it. HOW I manage to do it is another issue :-). But can wait till I hit concrete problems.

Thank you!

Best wishes
Josiah

PMario

unread,
Jan 29, 2017, 2:39:26 PM1/29/17
to tiddl...@googlegroups.com
On Sunday, January 29, 2017 at 2:22:57 PM UTC+1, Josiah wrote:
That helps. And looks like enough to do it. HOW I manage to do it is another issue :-). But can wait till I hit concrete problems.

:) ... It's actually easier, than my first idea. See the attachment.

It contains a tiddler named: field-sort  ... This can be any name. If you want to hide it from your users add $:/ to make it a system tiddler.  The body just contains a list of space separated field names.
and $:/core/ui/EditTemplate/fields  which overwrites the core field template. If you use a different name than field-sort you'll also need to adjust this tiddler with the new name. .. It's only one change.

and there is a test tiddler: edit-this-tiddler.

The mechanism is based on: http://tiddlywiki.com/#sortby%20Operator:%5B%5Bsortby%20Operator%5D%5D%20%5B%5Bsortby%20Operator%20(Examples)%5D%5D

have fun!
mario
sort-tiddler-fields-experiment.json
Reply all
Reply to author
Forward
0 new messages