Given below is a modified $:/core/ui/Actions/new-journal I use in my wiki with name$:/core/ui/Actions/new-journal-mod
to create custom Journal tiddlers,
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
\whitespace trim
<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}>
<$wikify name="journalTitle" text="""<$macrocall $name="now" format=<<journalTitleTemplate>>/>""">
<$reveal type="nomatch" state=<<journalTitle>> text="">
<$action-sendmessage $message="tm-new-tiddler" $param="Day" title=<<journalTitle>> tags=<<get-tags>> text={{{ [<journalTitle>get[]] }}} journal-date=<<now "YYYY0MM0DD0hh0mm0ss000">> month={{{ [<journalTitle>split[,]rest[]] }}} link={{{ [<journalTitle>split[,]rest[]] }}} year={{{[<journalTitle>split[]last[4]join[]]}}} />
</$reveal>
<$reveal type="match" state=<<journalTitle>> text="">
<$action-sendmessage $message="tm-new-tiddler" $param="Day" title=<<journalTitle>> tags=<<get-tags>> text=<<journalText>> journal-date=<<now "YYYY0MM0DD0hh0mm0ss000">> month={{{ [<journalTitle>split[,]rest[]] }}} link={{{ [<journalTitle>split[,]rest[]] }}} year={{{[<journalTitle>split[]last[4]join[]]}}} />
</$reveal>
</$wikify>
</$vars>
Since the $param I use to create these tiddlers have a tag called template
(which has use elsewhere), I need to delete this tag alone from the newly created Journal tiddlers (I need to retain the Journal
tag). I tried using the action listops operator after the tm-new-tiddler message, but it wasn’t working.
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
\whitespace trim
<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}>
<$wikify name="journalTitle" text="""<$macrocall $name="now" format=<<journalTitleTemplate>>/>""">
<$reveal type="nomatch" state=<<journalTitle>> text="">
<$action-sendmessage $message="tm-new-tiddler" $param="Day" title=<<journalTitle>> tags=<<get-tags>> text={{{ [<journalTitle>get[]] }}} journal-date=<<now "YYYY0MM0DD0hh0mm0ss000">> month={{{ [<journalTitle>split[,]rest[]] }}} link={{{ [<journalTitle>split[,]rest[]] }}} year={{{[<journalTitle>split[]last[4]join[]]}}} />
<$action-listops $tags="-template"/>
</$reveal>
<$reveal type="match" state=<<journalTitle>> text="">
<$action-sendmessage $message="tm-new-tiddler" $param="Day" title=<<journalTitle>> tags=<<get-tags>> text=<<journalText>> journal-date=<<now "YYYY0MM0DD0hh0mm0ss000">> month={{{ [<journalTitle>split[,]rest[]] }}} link={{{ [<journalTitle>split[,]rest[]] }}} year={{{[<journalTitle>split[]last[4]join[]]}}} />
<$action-listops $tags="-template"/>
</$reveal>
</$wikify>
</$vars>
How to modify this code to remove the tag template
??
Here is a demo of the new custom journal button. Check out this new page control button
For the time being the demo wiki I uploaded here is not loading. I will fix it soon.