When opening a new tiddler, I start by typing “draft”.
when it gets complicated, I will change “draft” to “preview”.
When it is finally done, I will remove “draft” or “preview” from the tiddler text.
I have modified the first line many times and just wish there was an easy way to do it.
so what I asking is: How to automatically generate first line block by field?
For example:
add a new filed “status:draft” to the tiddler and automatically display “draft” in the first line.
changed the filed value “status:done” and it display nothing in first line.
I dont know if this is possible and how to implement this feature in TiddlyWiki. maybe someone can point me a way.
The first line with filter="[all[current]get[status]]"gets the status field from the current tiddler the template is shown in and sets the value to the variable “currentStatus”
So the content of the inner list <<currentStatus>> will contain that text of the field. So if you decide to use any other status-value you are good to go
The inner list with the filter="[<currentStatus>!match[done]]" checks if the currentStatus variable does not match “done”. … So it shows the content of the list.
if the value is done, it will show nothing.
The field: list-before is used to define the position in the ViewTemplate. By default it would be shown at the end of the tiddler. See docs about list-before
\whitespace trim … is there to remove the indentation in the code.
Important: If you want more complex text, you may need to remove the \whitespace trimpragma and the indents