Customise the journal

Hello!

Today I was playing around with TiddlyWiki’s journal feature. I would like to use an alternative title in certain situations. This isn’t a problem in itself, e.g. I can simply manually insert the line

<$view field=“created” format=“date” template=“DDD, 0DD.0MM.YYYY”/>

into the caption field. But I would like to automate this. However, I will probably have to expand the algorithm of the journal button to do this. That’s why I looked at

https://tiddlywiki.com/#Making%20a%20custom%20journal%20button

and I was confused:

When I click on the “New Journal” link there, the tiddler $:/core/ui/Buttons/new-journal opens as expected. I also clone this and open it to edit it, but I can’t find the described lines there! Either the tiddler has been changed significantly in the meantime, or the instructions are simply wrong, because if I open the tiddler “$:/core/ui/Buttons/new-journal-here” instead, I find the relevant lines there. I can’t say whether this is just a case of confusion.

This doesn’t solve my original problem, but I think the tiddler should be corrected.

And of course it would be nice if there would be an easy way to generate user-defined fields with predefined content for the journal tiddler automatically. But that would be another topic.

I can assist you shortly but have you reviewed the settings > info > basics journal settings?

By the way, Welcome back @J_C_S

Hello Tones!
Yes, I haven’t written for a long time. English isn’t exactly my preferred language, but it’s enough to communicate.

Of course I use the settings. But there are only entries for the title, the text and the tags. I usually use the template YYYY/0MM/0DD in the title. This is the easiest to sort. But for display I prefer the template described above.

I currently have the line mentioned as a heading in the text template. I’ll copy them when I create a new journal tiddler, but filling the caption field automatically would be easier.

But what was actually more important to me is the error in the documentation described above. It can be quite confusing. I didn’t know where to report him, so I wrote here.

If you can help me with the caption field thing, I would of course be happy!

I will review your comments and share my own solutions for journals today. And reply by editing this reply.

By the way, welcome back @J_C_S Johannes

Journal Titles

What I do for the tittle of Journal tiddlers is to use the setting in the Info Basic setting for the tiddler title, but I modify a few tiddlers so that when I create a Journal tiddler it adds a journal-date field to the tiddler, using the tiddlywiki date stamp format. This provides maximum sort order options.

new-journals-and-journal-date.json (2.4 KB)

The template for new Journals;

The new journal tiddlers set there text field to that found in Info > Basic > Text for new journal tiddlers

This is about making your own button, and points to tiddlers you need to make for it to work

<$set name="journalTitleTemplate" value={{$:/config/myNewTiddler/Title}}>
<$set name="journalTags" value={{$:/config/myNewTiddler/Tags}}>
<$set name="journalText" value={{$:/config/myNewTiddler/Text}}>

I suggest just using my package above and the Info > Basics settings.

Now perhaps avoid setting the text field, for new journals and create a tiddler tagged $:/tags/ViewTemplate containing;

<$list filter="[all[current]tag[Journal]]" variable=nul>

<$view field=“journal-date” format=“date” template=“DDD, 0DD.0MM.YYYY”/>
include here what you want to appear on your jornal tiddlers such as display the day of the week using the vale in the journal-date field

</$list>
  • I put your code in there modified to use the journal date,

Personaly in the view template as above, I transclude a seperate journal template tiddler as follows;

<$transclude tiddler=mytemplate/>
  • This template has edit fields, interstitial journaling, checkboxes etc… they look as if they are in the tiddler (but are not in the text field) and when checked or edited they update fields in the current journal tiddler I have open.
  • So here the user defined fields get created in the Journal tiddler if you set a value using the viewtemplate.

If you really do want to create new journal tiddlers from a tiddler template (and the title/tags and text field in Info > basics, is not enough) you need to follow the custom journal button approach.

1 Like

So, before I went to bed, I looked at it again.

Yes, that’s right, I got that far: If so, I have to adjust both tiddlers:
$:/core/ui/Actions/new-journal
and
$:/core/ui/Buttons/new-journal-here

$:/core/ui/Buttons/new-journal, the tiddler referred to in the instructions, uses $:/core/ui/Actions/new-journal. That’s why the adjustment has to happen there.

I think the new journal-date field is a good idea. I tried something similar before, but didn’t know where to start to automate it. Thank you very much for that!

I’m too tired today, it’s almost 2am here! But if I actually want to implement this with the caption field, I have a good template with your change.

I’ll have to watch the rest when I’m well rested.