Folks,
As you may be aware, it is possible to assign the $:/tags/ViewTemplate to a tiddler to make it appear on tiddlers, viewTemplate. You can wrap this in a condition to choose when to display it, you can also choose if it will or will not be hidden if the tiddler is folded/unfolded.
You can also make use of the list-before or list-after fields to position a tiddler within the viewTemplate or go ahead and reorder the elements with drag and drop using the $:/tags/ViewTemplate tag pill.
My Question;
Is there a way we could alter the order of the view template items appear on a specific tiddler rather than all tiddlers?
My thoughts;
- perhaps an alternate viewTemplate would be needed
- It seems to me a custom field on a tiddler could be used to;
- sortby the custom field
- a replacement list, then you could add and exclude viewTemplate items as well.
- This may be good to add to the hackability of the view/edit template mechanism’s because at present no bespoke or interactive tiddler based ordering is possible.
Why?
In some cases we may have a button that results in a conditional element being displayed in the viewTemplate, however there may be a reason to alter the order they are displayed in different tiddlers, or a class of tiddlers.
For example imagine a large tiddler containing prose text, we may have a list of references we want to display. In some cases we would prefer this above the body text in others below.
Something similar would be helpful in the edit template for example to bring the edit fields list to the top when there is a lot of text, so you do not need to scroll. For example show the edit fields component above tiddlers whos text field exceeds 20,000 characters.
Presently to achieve this, you need to add additional items to the view or edit template and add appropriate conditions to both elements. This acts to bloat the size of the view/edit template rendering of every tiddler.
What are your thoughts?
Regards
Tones