Show user field on each Tiddler

113 views
Skip to first unread message

Stefan Schlechter

unread,
Apr 7, 2021, 3:22:20 PM4/7/21
to TiddlyWiki

Hello,

in every new Tiddler I add the field "published" - which will contain an individual date:
published.png
(plublished date <> created date <> modified date)

How can this be done, that on every Tiddler this field will be shown under Toolbar like: field_displayed_on_right_side.png
Thanks for feedback

Stefan

Odin

unread,
Apr 7, 2021, 3:43:27 PM4/7/21
to TiddlyWiki
Hi!

This can be achieved with the $:/tags/ViewTemplate tag. Make a tiddler tagged with '$:/tags/ViewTemplate'. This will make the contents of this tiddler appear on any tiddler in your wiki. Then copy the following inside the tiddler:

<$list filter="[all[current]has:field[published] ]">
{{!!published}}
 </$list>

The list acts like an if statement. If the current tiddler you are looking at has the field published, it will show the contents of the published field.
You can adjust the position of the contents with list-after and list-before fields.

Hope that helps!
Op woensdag 7 april 2021 om 21:22:20 UTC+2 schreef schlechter...@gmail.com:

Stefan Schlechter

unread,
Apr 8, 2021, 9:18:35 AM4/8/21
to TiddlyWiki
Hello Odin,

Thanks for your tip - but it's not working.
What I'm doing wrong?
published_nok.png
Thanks
Stefan

Anjar

unread,
Apr 8, 2021, 10:13:29 AM4/8/21
to TiddlyWiki
Hi Stefan,

Try removing the space inside the filter; i.e.

<$list filter="[all[current]has:field[published]]">
{{!!published}}
 </$list>

Best, 
Anders

Stefan Schlechter

unread,
Apr 8, 2021, 1:20:58 PM4/8/21
to TiddlyWiki
Hello Anjar,

thanks - this works :-)
And how do I get the field to to right top?
Image.png

Thanks
Stefan

Anjar

unread,
Apr 8, 2021, 6:54:21 PM4/8/21
to TiddlyWiki
Hi,

To move it to the right, wrap it in a div (you may want to play with the padding)

<$list filter="[all[current]has:field[published]]">
<div style="float:right; padding-right:10px;">{{!!published}}</div>
 </$list>

And to bring it to the top, add a field called "list-before" and set the value to "$:/core/ui/ViewTemplate/body"

Best,
Anders

Stefan Schlechter

unread,
Apr 9, 2021, 1:40:45 AM4/9/21
to TiddlyWiki
Hello Anders,

nice, it works!

Thank you,
Stefan
Reply all
Reply to author
Forward
0 new messages