New Tiddler and New Journal Templates

One question I frequently see in the forum is how to create a tiddler/journal having specific tags/fields/ starting text,…

TW 5.2.0 has some nice feature see

What do you you think if TW allows to set a template for Journal and New Tiddler in the control panel for less friction! This way you have also shortcut keys are set there!

1 Like

Mohammad making it easier for users is always a noble goal however when providing such features we can inadvertently miss direct people.

I can see a template for new journal entries making sense, or do I? When making such a template one would be inclined to include text for a standard journal, but this may not make sense, since that same text will be included in every journal, and consume bytes. It is possibly smarter to have a custom view template that displays standard headings etc… and actually creates them on edit, on demand and when needed.

This is even more pronounced with new tiddlers, because more often than not there is value in having other tiddler types, from notes, to contacts, essays and dictionary or reference entries to name but a few. To me there is no single tiddler template and to suggest there was, I think may limit peoples imagination and use of tiddlywiki.

However I do see value in improving this, I would prefer to see a template handling tool that allows you to define many and then at new tiddler, or after, or from the missing tiddler viewTemplate allow the application of a template to any tiddler. This could be defined for both system and regular tiddlers.

Such templates are less likely to provide “canned text” and more likely to set fields and apply tags. These setting then trigger a response in the view and or edit templates.

The solution I suggest here, is a little more involved but I think it expands the possibilities rather than restricts the Apparent possibilities especially for new users trying to understand the possibilities.

We would need to

  • Design a standard method for naming and creating templates to generate new tiddlers, a journal would be but one of these. This would include fieldnames, default values and tags, perhaps but not necessarily text.
  • List and allow selection of a template to be use or applied to any tiddler.
  • Provide a list of templates available and how to add new ones, or clone an existing template to make a new one
  • A set of buttons to create any tiddler from any defined template,
  • A method by which to share such templates between wikis and people.
    • Plugin designers could provide a set of templates for the kind of tiddlers their solution provides, eg a default table tiddler

All this is possible, and very powerful as long as we have a de facto standard.

Having used the default text for new journal tiddlers in the past for my work diary, I’ll weigh in and say that was quite useful – I used it to include standard section headings that I recorded events under. I suppose I could have used a standard view template and then created a tiddler for each section every day, but that would have been a lot of extra work for very little benefit, especially since I sometimes wanted to customize the set of headings for an individual day.

I agree with @TW_Tones though that it’s hard to imagine this working well for a new standard tiddler. I suppose someone could have a wiki where there was really only one type of tiddler that needed standard headings, etc., but in that case it wouldn’t be hard to create a custom button for this behavior.

1 Like

Maybe what’s needed is a new tiddler template maker. Someone might not need a new Journal tiddler, but might want a new Recipe tiddler, a new Contact tiddler, and a new Login tiddler.

You could specify the default title, fields, control keys, and icon, and a new button with the selected icon would appear in the sidebar.


I think the Mark proposal is great! Having a simple wizard /maker to create a custom template on demand!

1 Like

I have done a lot of work on this, So happy top provide a proof of concept. It would be for tiddlers rather than system tiddlers because the template would be a system tiddler.

The only “community question” I can think of is how do we differentiate between different “tiddler types”, for my personally wikis I would use the “object-type” field, other said we should not use the type field user/tiddler-type although I see value in that. I am not keen on wasting tags on this but it is easier to understand for new users.

I noted this discussion here “New Tiddler and New Journal Templates” started but has being idle for a while.

First just on the new journal templates

I note that the new journal actions in effect define the new journal template;

Using the existing “Text for new journal tiddlers” you can set a transclusion such as {{||journal-template}}but this only rendered on viewing the journal tiddler.

In this modified journal actions tiddler it first renders the content of $:/config/NewJournal/Text at journal creation. NewJournal-template.json (1.0 KB)

  • By modifying the actions this also works for new Journal here.

On tiddler templates in General

Not withstanding the above, a generic tiddler templating method would be good; Some more thoughts on this;

  • Perhaps an alternate “add tiddler button” that provides a drop down of defined templates.
  • tm-new-tiddler and ActionCreateTiddlerWidget have additional functionality now to assist with this eg; Clone and modify.
  • There would be value allowing a set of configurable actions to be set for the create from template process.
  • A very powerful templating system could include the following;
    • On the template tiddler retrieve all tiddlers using the template, detecting additional fields and content and permit;
      • These changes to be incorporated into the template
      • Retrospectively update all tiddlers using the template when it changes.
1 Like