Wonderful tip!
Just one point. If you use a language plugin, you must change the first
line in your code:
<$vars titlePrefix="New tiddler template: ">
to the text in your language:
<$vars titlePrefix=$:/language/DefaultNewTiddlerTitle+" template: ">
or it will duplicate buttons.
Also, if you want to have several templates, each needs a diferent
tittlePrefix.
El dimecres, 27 maig de 2020 15:55:31 UTC+2, bimlas va escriure:
> Dear all,
>
> There was probably a similar solution already, but I just figured it out:
> I found a simple way to create templates for different tiddler types. For
> example, in the "Software" tiddlers, display the "website" and "platform"
> fields, and in the "Song" tiddlers, display "author", "album" and "year" by
> default so you don't have to remember to enter the "required" fields.
>
> To do this, create the mentioned tiddlers as "New tiddler
> template: Software" and "New tiddler template: Song" and add the desired
> fields to them. You can even enter a predefined text if you want to store
> the data not in fields but in the text of the tiddler itself.
>
> Create a tiddler of any name, add the "$:/tags/SideBarSegment" tag and
> optionally the "list-before: $:/core/ui/SideBarSegments/tabs" field. The
> content should be:
>
> <$vars titlePrefix="New tiddler template: ">
> <$list filter="[search:title<titlePrefix>]">
> <$button message="tm-new-tiddler" param=<<currentTiddler>> class=<
> <tv-config-toolbar-class>>>
> {{$:/core/images/new-button}} <$text text={{{
> [all[current]removeprefix<titlePrefix>] }}}/>
> </$button> <br/>
> </$list>
> </$vars>
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/847ccf9b-0d01-46ff-b479-450da09b6db3%40googlegroups.com.