[TW5] Change title of template tiddler (or template text in new journal tidddler)?

173 views
Skip to first unread message

HC Haase

unread,
Oct 7, 2016, 8:56:19 AM10/7/16
to TiddlyWiki
Hello
I am trying to make a button to make a custom tiddler for a category I use a lot. I would like a button that make a new tiddler with a title like "some-word date/of/today" and my custom text in the text field and some extra fields.

First I made a button and that used a custom template (http://tobibeer.github.io/tb5/#Create%20Tiddler%20From%20Template). but how to write the date automatically (like the journal tiddler) in the title?

Then I tired the custom new journal tutorial (http://tobibeer.github.io/tb5/#Custom%20New%20Journal%20Button), great But how to put your custom text and fields in it?

any suggestions?
thanks

Riz

unread,
Oct 7, 2016, 11:02:11 AM10/7/16
to TiddlyWiki


See if this works for you.

\define newtitle()
MyCustomTitleText $(time)$
\end

<$set name=time value=<<now>>>
<$button>Let there be..
<$action-sendmessage $message="tm-new-tiddler" title=<<newtitle>> tags=mytag text="My Text"/>
</$button>

HC Haase

unread,
Oct 10, 2016, 3:35:39 AM10/10/16
to TiddlyWiki
Thanks for your help.
It works BUT only with single line content in the text field. I need a text field with filters and stuff in it, so this don't work.
Also I cant get the 
\define newtitle()
MyCustomTitleText $(time)$
\end

<$set name=time value=<<now>>>

from the above to work with a template button. How come?

Rizwan Ishak

unread,
Oct 10, 2016, 7:11:45 AM10/10/16
to tiddl...@googlegroups.com
You can use your template tiddler to fill in other fields except the title. eg: Create the template tiddler with multiple lines of text, different tags you need, and fields with or without values. Let the title of the custom template be 'MyTemplate'. Now the button code will look like:

\define newtitle()
MyCustomTitleText $(time)$
\end

<$set name=time value=<<now>>>
<$button>Let there be..

<$action-sendmessage $message="tm-new-tiddler" title=<<newtitle>> $param=MyTemplate/>
</$button>

| from the above to work with a template button. How come?

Did you define it in the same tiddler as that of the template button?

Go ahead, make my day.

Rizwan Ishak


HC Haase

unread,
Oct 11, 2016, 5:44:32 AM10/11/16
to TiddlyWiki
Thansk
that worked. It was the " $param=MyTemplate/>" command I did not knew.

BTW
Your nuun project link looks really nice! I like the rotating menu button! and dark theme
Reply all
Reply to author
Forward
0 new messages